lkml.org 
[lkml]   [2019]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf] xdp: fix potential deadlock on socket mutex
From
Date
On 07/08/2019 01:03 PM, Ilya Maximets wrote:
> 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>

Applied, thanks!

\
 
 \ /
  Last update: 2019-07-12 15:09    [W:0.031 / U:59.880 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site