WSL2-Linux-Kernel/net/bridge
Eric Dumazet fcfb894d59 net: bridge: fix net device refcount tracking issue in error path
I left one dev_put() in br_add_if() error path and sure enough
syzbot found its way.

As the tracker is allocated in new_nbp(), we must make sure
to properly free it.

We have to call dev_put_track(dev, &p->dev_tracker) before
@p object is freed, of course. This is not an issue because
br_add_if() owns a reference on @dev.

Fixes: b2dcdc7f73 ("net: bridge: add net device refcount tracker")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-12 14:44:18 +00:00
..
netfilter netfilter: nft_meta: cancel register tracking after meta update 2022-01-09 23:35:17 +01:00
Kconfig
Makefile
br.c net: make use of helper netif_is_bridge_master() 2021-10-16 15:02:56 +01:00
br_arp_nd_proxy.c
br_cfm.c
br_cfm_netlink.c
br_device.c
br_fdb.c net: bridge: move br_fdb_replay inside br_switchdev.c 2021-10-27 14:54:02 +01:00
br_forward.c
br_if.c net: bridge: fix net device refcount tracking issue in error path 2022-01-12 14:44:18 +00:00
br_input.c
br_ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-31 14:35:40 +00:00
br_mdb.c net: bridge: mdb: move all switchdev logic to br_switchdev.c 2021-10-28 20:05:57 -07:00
br_mrp.c
br_mrp_netlink.c
br_mrp_switchdev.c
br_multicast.c net: bridge: mcast: add and enforce startup query interval minimum 2021-12-29 12:59:38 -08:00
br_multicast_eht.c
br_netfilter_hooks.c netfilter: bridge: add support for pppoe filtering 2021-11-30 23:37:55 +01:00
br_netfilter_ipv6.c
br_netlink.c net: bridge: mcast: add and enforce startup query interval minimum 2021-12-29 12:59:38 -08:00
br_netlink_tunnel.c
br_nf_core.c
br_private.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
br_private_cfm.h
br_private_mcast_eht.h
br_private_mrp.h
br_private_stp.h
br_private_tunnel.h
br_stp.c
br_stp_bpdu.c
br_stp_if.c net: use eth_hw_addr_set() 2021-10-02 14:18:25 +01:00
br_stp_timer.c
br_switchdev.c net: bridge: switchdev: consistent function naming 2021-10-28 20:05:57 -07:00
br_sysfs_br.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
br_sysfs_if.c
br_vlan.c bridge: use __set_bit in __br_vlan_set_default_pvid 2021-11-26 16:47:56 -08:00
br_vlan_options.c net: bridge: mcast: add and enforce startup query interval minimum 2021-12-29 12:59:38 -08:00
br_vlan_tunnel.c