All of lore.kernel.org
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH]:net-sched: fix Action flushing return code
Date: Fri, 08 Aug 2008 09:47:05 -0400	[thread overview]
Message-ID: <1218203225.4688.56.camel@localhost> (raw)

[-- 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);

             reply	other threads:[~2008-08-08 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 13:47 jamal [this message]
2008-08-13  9:41 ` [PATCH]:net-sched: fix Action flushing return code David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1218203225.4688.56.camel@localhost \
    --to=hadi@cyberus.ca \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.