diff options
author | Eric Dumazet <edumazet@google.com> | 2022-01-12 13:53:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-12 15:44:18 +0100 |
commit | fcfb894d5952786db3b2b2b9cd3a95cdcedb6ff0 (patch) | |
tree | 9a19318c08a4c63c3cf8d7183397293ea6c37486 /README | |
parent | Merge branch 'ipa-fixes' (diff) | |
download | linux-fcfb894d5952786db3b2b2b9cd3a95cdcedb6ff0.tar.xz linux-fcfb894d5952786db3b2b2b9cd3a95cdcedb6ff0.zip |
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: b2dcdc7f731d ("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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions