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

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
baycom_epp.c
baycom_par.c
baycom_ser_fdx.c
baycom_ser_hdx.c
bpqether.c hamradio: fix issue of dev reference count leakage in bpq_device_event() 2022-11-16 09:57:11 +01:00
dmascc.c
hdlcdrv.c
Kconfig
Makefile
mkiss.c hamradio: fix macro redefine warning 2022-03-08 19:09:39 +01:00
scc.c
yam.c yam: fix a memory leak in yam_siocdevprivate() 2022-02-01 17:25:47 +01:00
z8530.h