linux/drivers/atm
Xin Xiong 51875dad43 atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
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>
2020-07-30 17:35:53 -07:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
adummy.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
ambassador.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
ambassador.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
atmtcp.c atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent 2020-07-30 17:35:53 -07:00
eni.c ioremap changes for 5.6 2020-01-27 13:03:00 -08:00
eni.h
firestream.c firestream: fix memory leaks 2020-01-25 22:01:51 +01:00
firestream.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
fore200e.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
fore200e.h
he.c atm: he: clean up an indentation issue 2019-09-25 13:54:45 +02:00
he.h
horizon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
horizon.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 37 2019-05-24 17:27:11 +02:00
idt77105.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
idt77105.h
idt77252.c atm: idt77252: Remove call to memset after dma_alloc_coherent 2019-07-15 11:06:27 -07:00
idt77252.h
idt77252_tables.h
iphase.c atm: iphase: Fix Spectre v1 vulnerability 2019-08-02 17:30:36 -07:00
iphase.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
lanai.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Makefile
midway.h
nicstar.c atm: nicstar: fix if-statement empty body warning 2020-02-29 21:28:30 -08:00
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c atm: Use dev_get_drvdata 2019-07-23 13:02:41 -07:00
suni.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
suni.h
tonga.h
uPD98401.h
uPD98402.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
uPD98402.h
zatm.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
zatm.h
zeprom.h