linux_dsm_epyc7002/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
ambassador.c
ambassador.h
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
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
horizon.h
idt77105.c
idt77105.h
idt77252_tables.h
idt77252.c
idt77252.h
iphase.c
iphase.h
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
lanai.c
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
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c
zatm.h
zeprom.h