diff mbox

[net-next-2.6] net sched: make pedit check for clones instead

Message ID 1275655386.3445.62.camel@bigi
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

jamal June 4, 2010, 12:43 p.m. UTC
And here's the second one. I noticed Changli's changes are not yet in
net-next. I will wait for that change to propagate and then send the
fix to pedit that i discussed with Herbert.

cheers,
jamal
commit 0697bf778d48d155ef48f652cee8f103db3dcedb
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Fri Jun 4 08:39:47 2010 -0400

    net sched: make pedit check for clones instead
    
    Now that the core path doesnt set OK to munge we detect
    writable skbs by looking to see if they are cloned.
    
    Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>

Comments

Herbert Xu June 4, 2010, 1:05 p.m. UTC | #1
On Fri, Jun 04, 2010 at 08:43:06AM -0400, jamal wrote:
> And here's the second one. I noticed Changli's changes are not yet in
> net-next. I will wait for that change to propagate and then send the
> fix to pedit that i discussed with Herbert.

Thanks Jamal!

BTW, I think this patch should go in first (before the one that
removes the OK2MUNGE setting) to be on the safe side.

Cheers,
David Miller June 7, 2010, 8:09 a.m. UTC | #2
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Fri, 4 Jun 2010 23:05:11 +1000

> On Fri, Jun 04, 2010 at 08:43:06AM -0400, jamal wrote:
>> And here's the second one. I noticed Changli's changes are not yet in
>> net-next. I will wait for that change to propagate and then send the
>> fix to pedit that i discussed with Herbert.
> 
> Thanks Jamal!
> 
> BTW, I think this patch should go in first (before the one that
> removes the OK2MUNGE setting) to be on the safe side.

I applied them this way to net-next-2.6, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index fdbd0b7..8d15caf 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -127,8 +127,7 @@  static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
 	int i, munged = 0;
 	u8 *pptr;
 
-	if (!(skb->tc_verd & TC_OK2MUNGE)) {
-		/* should we set skb->cloned? */
+	if (skb_cloned(skb)) {
 		if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
 			return p->tcf_action;
 		}