I need to stare at this one for longer than 1 minute and i dont have time right now; it does look strange (I am unsure what my thoughts were at that point with -err - or maybe that was a change made by someone else). I dont have time until tommorow - but i would think the better fix will be to change "return -err" to "return -1"?
cheers, jamal On Wed, 2006-05-07 at 00:00 +0200, Thomas Graf wrote: > plain text document attachment (act_fix_dump_err_handling) > "return -err" and blindly inheriting the error code in the netlink > failure exception handler causes errors codes to be returned as > positive value therefore making them being ignored by the caller. > > May lead to sending out incomplete netlink messages. > > Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> > > > Index: net-2.6.git/net/sched/act_api.c > =================================================================== > --- net-2.6.git.orig/net/sched/act_api.c > +++ net-2.6.git/net/sched/act_api.c > @@ -250,15 +250,17 @@ tcf_action_dump(struct sk_buff *skb, str > RTA_PUT(skb, a->order, 0, NULL); > err = tcf_action_dump_1(skb, a, bind, ref); > if (err < 0) > - goto rtattr_failure; > + goto errout; > r->rta_len = skb->tail - (u8*)r; > } > > return 0; > > rtattr_failure: > + err = -EINVAL; > +errout: > skb_trim(skb, b - skb->data); > - return -err; > + return err; > } > > struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, > > -- > > - > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html