[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6e9dbe30-ec0f-07cb-0e16-d86eb4bc480f@gmail.com>
Date: Wed, 19 Oct 2016 15:45:56 +0800
From: Baozeng Ding <sploving1@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: net/ipv6: potential deadlock in do_ipv6_setsockopt
It fixes the issue for me.
Tested-by: Baozeng Ding <sploving1@...il.com>
On 2016/10/17 17:54, Baozeng Ding wrote:
> Applied the patch to my test tree. I will tell you the result a few days later. Thank you.
>
> On 2016/10/17 2:50, Cong Wang wrote:
>> 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.
>>
Powered by blists - more mailing lists