diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-11 18:42:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-11 23:51:18 -0400 |
commit | c29390c6dfeee0944ac6b5610ebbe403944378fc (patch) | |
tree | befe951b043be948957abb1db65cee36dd7a379b /net/core | |
parent | c8a4d29988edb0db9ee80669f2e5e21bd9f7e0d0 (diff) | |
download | blackbird-obmc-linux-c29390c6dfeee0944ac6b5610ebbe403944378fc.tar.gz blackbird-obmc-linux-c29390c6dfeee0944ac6b5610ebbe403944378fc.zip |
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: 2bd82484bb4c ("xps: fix xps for stacked devices")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/skbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f80507823531..434e78e5254d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -4173,7 +4173,7 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet) skb->ignore_df = 0; skb_dst_drop(skb); skb->mark = 0; - skb->sender_cpu = 0; + skb_sender_cpu_clear(skb); skb_init_secmark(skb); secpath_reset(skb); nf_reset(skb); |