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.