[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1477001458.7065.37.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Thu, 20 Oct 2016 15:10:58 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Baozeng Ding <sploving1@...il.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
Subject: Re: [Patch net v2] ipv6: fix a potential deadlock in
do_ipv6_setsockopt()
On Thu, 2016-10-20 at 14:35 -0700, Cong Wang wrote:
> On Thu, Oct 20, 2016 at 6:47 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> > On Wed, 2016-10-19 at 23:35 -0700, Cong Wang wrote:
> >> Baozeng reported this deadlock case:
> >
> > ...
> >
> >> +
> >> +void ipv6_sock_mc_close(struct sock *sk)
> >> +{
> >> + struct ipv6_pinfo *np = inet6_sk(sk);
> >> +
> >> + if (!rcu_access_pointer(np->ipv6_mc_list))
> >> + return;
> >
> > I wonder if rcu_dereference_protected(..., lockdep_sock_is_held(sk))
> > could be used instead, to get lockdep support ?
>
> Maybe, but this "problem" exists without my patch too, right?
I used 'I wonder if' to say that we might have some better way to code
this test nowadays, but this can be done in a separate patch of course.
Powered by blists - more mailing lists