* [PATCH]:net-sched: fix Action flushing return code
@ 2008-08-08 13:47 jamal
2008-08-13 9:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: jamal @ 2008-08-08 13:47 UTC (permalink / raw)
To: David Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
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
[-- Attachment #2: act_f2 --]
[-- Type: text/plain, Size: 1245 bytes --]
net-sched: fix Action flushing return code
Flushing must consistently return ENOMEM on failure of any allocation
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
---
commit 0ca9612919f1e4e579915f947dae05858d3b40f2
tree 5915d47665f6408042a805f45a1b4872be97c8ef
parent 4e13e943acd2aa262e1e10c7779518d3ca18cae3
author Jamal Hadi Salim <hadi@cyberus.ca> Fri, 08 Aug 2008 09:44:22 -0400
committer Jamal Hadi Salim <hadi@cyberus.ca> Fri, 08 Aug 2008 09:44:22 -0400
net/sched/act_api.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 88b5733..9974b3f 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]:net-sched: fix Action flushing return code
2008-08-08 13:47 [PATCH]:net-sched: fix Action flushing return code jamal
@ 2008-08-13 9:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-08-13 9:41 UTC (permalink / raw)
To: hadi; +Cc: netdev
From: jamal <hadi@cyberus.ca>
Date: Fri, 08 Aug 2008 09:47:05 -0400
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-13 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 13:47 [PATCH]:net-sched: fix Action flushing return code jamal
2008-08-13 9:41 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).