:net-sched: fix Action flushing return code
Subsystems (3)
PATCH 1/1 :net-sched: fix Action flushing return code
This depends on previous patch "net-sched: Fix actions flushing". Sorry - i noticed the discrepancy on the return codes only after i sent the earlier patch.
cheers,
jamal
net-sched: fix Action flushing return code
Flushing must consistently return ENOMEM on failure of any allocation
---
commit 0ca9612919f1e4e579915f947dae05858d3b40f2
tree 5915d47665f6408042a805f45a1b4872be97c8ef
parent 4e13e943acd2aa262e1e10c7779518d3ca18cae3
author Jamal Hadi Salim <[email protected]> Fri, 08 Aug 2008 09:44:22 -0400 committer Jamal Hadi Salim <[email protected]> Fri, 08 Aug 2008 09:44:22 -0400
net/sched/act_api.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
net/sched/act_api.c +2 -2
@@ -751,7 +751,7 @@ static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid)struct nlattr *tb[TCA_ACT_MAX +1 ];struct nlattr *kind;struct tc_action *a =create_a (0 ); -int err = -EINVAL ; +int err = -ENOMEM ;if (a ==NULL ) {printk ("tca_action_flush: couldnt create tc_action\n" );
@@ -762,7 +762,7 @@ static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid)if (!skb) {printk ("tca_action_flush: failed skb alloc\n" );kfree (a); -return -ENOBUFS ; +return err; } b =skb_tail_pointer (skb);
David Miller
maintainerFrom: jamal <[email protected]>
Date: Fri, 08 Aug 2008 09:47:05 -0400
Quoted 3 lines
This depends on previous patch "net-sched: Fix actions flushing". Sorry - i noticed the discrepancy on the return codes only after i sent the earlier patch.
Also applied, thanks.