From: Cong Wang <xiyou.wangc...@gmail.com>
Date: Wed, 12 Apr 2017 12:32:13 -0700

> Similar to commit 87e9f0315952
> ("ipv4: fix a potential deadlock in mcast getsockopt() path"),
> there is a deadlock scenario for IP_ROUTER_ALERT too:
> 
>        CPU0                    CPU1
>        ----                    ----
>   lock(rtnl_mutex);
>                                lock(sk_lock-AF_INET);
>                                lock(rtnl_mutex);
>   lock(sk_lock-AF_INET);
> 
> Fix this by always locking RTNL first on all setsockopt() paths.
> 
> Note, after this patch ip_ra_lock is no longer needed either.
> 
> Reported-by: Dmitry Vyukov <dvyu...@google.com>
> Tested-by: Andrey Konovalov <andreyk...@google.com>
> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com>

Applied.

Reply via email to