linux/drivers/atm
Xin Xiong fea1298d57 atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
[ Upstream commit 51875dad43 ]

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>
2020-08-11 15:32:33 +02:00
..
.gitignore
adummy.c
ambassador.c
ambassador.h
atmtcp.c atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent 2020-08-11 15:32:33 +02:00
eni.c atm: eni: fix uninitialized variable warning 2020-02-01 09:37:09 +00:00
eni.h
firestream.c firestream: fix memory leaks 2020-01-29 16:43:14 +01:00
firestream.h
fore200e.c fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-24 08:34:42 +01:00
fore200e.h
he.c atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:57 +01:00
he.h
horizon.c
horizon.h
idt77105.c
idt77105.h
idt77252_tables.h
idt77252.c atm: idt77252: remove redundant bit-wise or'ing of zero 2018-02-23 12:42:26 -05:00
idt77252.h
iphase.c atm: iphase: Fix Spectre v1 vulnerability 2019-08-09 17:52:29 +02:00
iphase.h
Kconfig Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 2019-09-21 07:16:57 +02:00
lanai.c
Makefile
midway.h
nicstar.c
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c atm: zatm: Fix empty body Clang warnings 2019-12-01 09:16:41 +01:00
zatm.h
zeprom.h