diff options
| author | Xin Xiong <xiongx18@fudan.edu.cn> | 2020-07-29 21:06:59 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-21 10:52:56 +0200 |
| commit | 5d30be8062f694b58975fb3b9c55111e30c1d5e8 (patch) | |
| tree | 9349669243f1ade55ce888f9bbf0356b21636945 /tools/lib/traceevent/event-parse.c | |
| parent | 1bb9389e15e58eaa0ba6c0f3e38237fdf09f2683 (diff) | |
atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
[ Upstream commit 51875dad43b44241b46a569493f1e4bfa0386d86 ]
atmtcp_remove_persistent() invokes atm_dev_lookup(), which returns a
reference of atm_dev with increased refcount or NULL if fails.
The refcount leaks issues occur in two error handling paths. If
dev_data->persist is zero or PRIV(dev)->vcc isn't NULL, the function
returns 0 without decreasing the refcount kept by a local variable,
resulting in refcount leaks.
Fix the issue by adding atm_dev_put() before returning 0 both when
dev_data->persist is zero or PRIV(dev)->vcc isn't NULL.
Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn>
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
0 files changed, 0 insertions, 0 deletions
