[Patch net] act_mirred: clear sender cpu before sending to tx

Subsystems: networking [general], tc subsystem, the rest

STALE4005d

3 messages, 3 authors, 2015-10-08 · open the first message on its own page

[Patch net] act_mirred: clear sender cpu before sending to tx

From: Cong Wang <hidden>
Date: 2015-10-07 00:24:13

Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared when moving from Rx
Tx, otherwise kernel could crash.

Cc: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <redacted>
Signed-off-by: Cong Wang <redacted>
---
 net/sched/act_mirred.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 2efaf4e..32fcdec 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -179,6 +179,7 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
 
 	skb2->skb_iif = skb->dev->ifindex;
 	skb2->dev = dev;
+	skb_sender_cpu_clear(skb2);
 	err = dev_queue_xmit(skb2);
 
 	if (err) {
-- 
1.8.3.1

Re: [Patch net] act_mirred: clear sender cpu before sending to tx

From: Eric Dumazet <hidden>
Date: 2015-10-07 01:27:27

On Tue, 2015-10-06 at 17:23 -0700, Cong Wang wrote:
Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared when moving from Rx
Tx, otherwise kernel could crash.

Cc: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <redacted>
Signed-off-by: Cong Wang <redacted>
---
Fixes: 2bd82484bb4c ("xps: fix xps for stacked devices")
Acked-by: Eric Dumazet <edumazet@google.com>

Re: [Patch net] act_mirred: clear sender cpu before sending to tx

From: David Miller <davem@davemloft.net>
Date: 2015-10-08 11:49:54

From: Cong Wang <redacted>
Date: Tue,  6 Oct 2015 17:23:47 -0700
Similar to commit c29390c6dfee ("xps: must clear sender_cpu before forwarding")
the skb->sender_cpu needs to be cleared when moving from Rx
Tx, otherwise kernel could crash.

Cc: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <redacted>
Signed-off-by: Cong Wang <redacted>
Applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help