]> git.baikalelectronics.ru Git - kernel.git/commit
xps: must clear sender_cpu before forwarding
authorEric Dumazet <edumazet@google.com>
Thu, 12 Mar 2015 01:42:02 +0000 (18:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2015 03:51:18 +0000 (23:51 -0400)
commit98b2d804180a9117ddc2f2345f8fc2b38fcd37d9
treebefe951b043be948957abb1db65cee36dd7a379b
parentf799c1cd4fc7cdd4ad5134e082d44e4f925fd58a
xps: must clear sender_cpu before forwarding

John reported that my previous commit added a regression
on his router.

This is because sender_cpu & napi_id share a common location,
so get_xps_queue() can see garbage and perform an out of bound access.

We need to make sure sender_cpu is cleared before doing the transmit,
otherwise any NIC busy poll enabled (skb_mark_napi_id()) can trigger
this bug.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: John <jw@nuclearfallout.net>
Bisected-by: John <jw@nuclearfallout.net>
Fixes: 21a6c6b31ab4 ("xps: fix xps for stacked devices")
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/skbuff.c
net/ipv4/ip_forward.c
net/ipv6/ip6_output.c