OrangePi_CM5/drivers/net/hamradio
Zhengchao Shao bcb3bb1069 hamradio: fix issue of dev reference count leakage in bpq_device_event()
[ Upstream commit 85cbaf032d3cd9f595152625eda5d4ecb1d6d78d ]

When following tests are performed, it will cause dev reference counting
leakage.
a)ip link add bond2 type bond mode balance-rr
b)ip link set bond2 up
c)ifenslave -f bond2 rose1
d)ip link del bond2

When new bond device is created, the default type of the bond device is
ether. And the bond device is up, bpq_device_event() receives the message
and creates a new bpq device. In this case, the reference count value of
dev is hold once. But after "ifenslave -f bond2 rose1" command is
executed, the type of the bond device is changed to rose. When the bond
device is unregistered, bpq_device_event() will not put the dev reference
count.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-16 09:57:11 +01:00
..
6pack.c hamradio: remove needs_free_netdev to avoid UAF 2022-04-20 09:23:09 +02:00
Kconfig docs: networking: move baycom to the hw driver section 2020-06-26 16:08:44 -07:00
Makefile
baycom_epp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
baycom_par.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
baycom_ser_fdx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
baycom_ser_hdx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 69 2019-05-24 17:36:47 +02:00
bpqether.c hamradio: fix issue of dev reference count leakage in bpq_device_event() 2022-11-16 09:57:11 +01:00
dmascc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
hdlcdrv.c hdlcdrv: replace unnecessary assertion in hdlcdrv_register 2019-12-19 17:34:20 -08:00
mkiss.c hamradio: fix macro redefine warning 2022-03-08 19:09:39 +01:00
scc.c drivers: net: hamradio: fix document location 2020-10-15 07:49:47 +02:00
yam.c yam: fix a memory leak in yam_siocdevprivate() 2022-02-01 17:25:47 +01:00
z8530.h