[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 16 Oct 2016 11:50:26 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Baozeng Ding <sploving1@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: net/ipv6: potential deadlock in do_ipv6_setsockopt
On Sun, Oct 16, 2016 at 6:34 AM, Baozeng Ding <sploving1@...il.com> wrote:
> Possible unsafe locking scenario:
>
> CPU0 CPU1
> ---- ----
> lock([ 165.136033] sk_lock-AF_INET6
> );
> lock([ 165.136033] rtnl_mutex
> );
> lock([ 165.136033] sk_lock-AF_INET6
> );
> lock([ 165.136033] rtnl_mutex
> );
>
> *** DEADLOCK ***
This is caused by the conditional rtnl locking in do_ipv6_setsockopt().
It looks like we miss the case of IPV6_ADDRFORM.
Please try the attached patch.
View attachment "ipv6-setsockopt.diff" of type "text/plain" (1379 bytes)
Powered by blists - more mailing lists