[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1507487115.14419.31.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Sun, 08 Oct 2017 11:25:15 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Ido Schimmel <idosch@...sch.org>
Cc: Ido Schimmel <idosch@...lanox.com>, netdev@...r.kernel.org,
davem@...emloft.net, weiwan@...gle.com, mlxsw@...lanox.com
Subject: Re: [PATCH net-next] ipv6: Do not use this_cpu_ptr() in preemptible
context
On Sun, 2017-10-08 at 19:54 +0300, Ido Schimmel wrote:
> Hi Eric,
> > prev = cmpxchg(p, NULL, pcpu_rt);
> > - if (prev) {
> > - /* If someone did it before us, return prev instead */
> > - /* release refcnt taken by ip6_rt_pcpu_alloc() */
> > - dst_release_immediate(&pcpu_rt->dst);
> > - /* release refcnt taken by above dst_hold() */
> > - dst_release_immediate(&pcpu_rt->dst);
> > - dst_hold(&prev->dst);
> > - pcpu_rt = prev;
> > - }
> > + BUG_ON(prev);
>
> Is this BUG_ON() now valid because of the local_bh_disable() in
> ip6_pol_route()?
Yes, this bug to trigger would need this code be re-entered from a hard
IRQ, and that would be wrong of course.
Powered by blists - more mailing lists