Skip to content
Commit a35165ca authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

ipv4: do not use this_cpu_ptr() in preemptible context



this_cpu_ptr() in preemptible context is generally bad

Sep 22 05:05:55 br kernel: [   94.608310] BUG: using smp_processor_id()
in
preemptible [00000000] code: ip/2261
Sep 22 05:05:55 br kernel: [   94.608316] caller is
tunnel_dst_set.isra.28+0x20/0x60 [ip_tunnel]
Sep 22 05:05:55 br kernel: [   94.608319] CPU: 3 PID: 2261 Comm: ip Not
tainted
3.17.0-rc5 #82

We can simply use raw_cpu_ptr(), as preemption is safe in these
contexts.

Should fix https://bugzilla.kernel.org/show_bug.cgi?id=84991

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarJoe <joe9mail@gmail.com>
Fixes: 9a4aa9af

 ("ipv4: Use percpu Cache route in IP tunnels")
Acked-by: default avatarTom Herbert <therbert@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84de67b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment