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_immed
Hi Eric,
On Sun, Oct 08, 2017 at 09:03:53AM -0700, Eric Dumazet wrote:
> Thanks Ido for this patch.
>
> IMO, we no longer play this read_lock() -> write_lock() game since
> ip6_dst_gc() could be called from rt6_make_pcpu_route()
Right, cause we can't deadlock anymore as with the rwlock.
>
> So
On Sun, 2017-10-08 at 18:18 +0300, Ido Schimmel wrote:
> Without the rwlock and with PREEMPT_RCU we're no longer guaranteed to be
> in non-preemptible context when performing a route lookup, so use
> raw_cpu_ptr() instead.
>
> Takes care of the following splat:
> [ 122.221814] BUG: using smp_proc
Without the rwlock and with PREEMPT_RCU we're no longer guaranteed to be
in non-preemptible context when performing a route lookup, so use
raw_cpu_ptr() instead.
Takes care of the following splat:
[ 122.221814] BUG: using smp_processor_id() in preemptible [] code:
sshd/2672
[ 122.221845