Searched hist:"5464 c3a0e9a037b63d5229cdea08dddc01a98aac" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/net/xdp/ |
H A D | xdp_umem.c | diff 5464c3a0e9a037b63d5229cdea08dddc01a98aac Mon Jul 08 06:03:44 CDT 2019 Ilya Maximets <i.maximets@samsung.com> xdp: fix potential deadlock on socket mutex
There are 2 call chains:
a) xsk_bind --> xdp_umem_assign_dev b) unregister_netdevice_queue --> xsk_notifier
with the following locking order:
a) xs->mutex --> rtnl_lock b) rtnl_lock --> xdp.lock --> xs->mutex
Different order of taking 'xs->mutex' and 'rtnl_lock' could produce a deadlock here. Fix that by moving the 'rtnl_lock' before 'xs->lock' in the bind call chain (a).
Reported-by: syzbot+bf64ec93de836d7f4c2c@syzkaller.appspotmail.com Fixes: 455302d1c9ae ("xdp: fix hang while unregistering device bound to xdp socket") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
H A D | xsk.c | diff 5464c3a0e9a037b63d5229cdea08dddc01a98aac Mon Jul 08 06:03:44 CDT 2019 Ilya Maximets <i.maximets@samsung.com> xdp: fix potential deadlock on socket mutex
There are 2 call chains:
a) xsk_bind --> xdp_umem_assign_dev b) unregister_netdevice_queue --> xsk_notifier
with the following locking order:
a) xs->mutex --> rtnl_lock b) rtnl_lock --> xdp.lock --> xs->mutex
Different order of taking 'xs->mutex' and 'rtnl_lock' could produce a deadlock here. Fix that by moving the 'rtnl_lock' before 'xs->lock' in the bind call chain (a).
Reported-by: syzbot+bf64ec93de836d7f4c2c@syzkaller.appspotmail.com Fixes: 455302d1c9ae ("xdp: fix hang while unregistering device bound to xdp socket") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|