From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@gnumonks.org>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH 1/5] NETFILTER ctnetlink: use ENOMEM instead of -1
Date: Sat, 08 Oct 2005 17:42:44 +0200 [thread overview]
Message-ID: <4347E8F4.5010807@trash.net> (raw)
In-Reply-To: <20051007221948.GL4450@rama.customers.eurospot.com>
Harald Welte wrote:
> [NETFILTER] ctnetlink: use ENOMEM instead of -1 (-ENOPERM)
>
> Fix the return value of NFA_PUT on fail. Now it returns -ENOMEM
> instead of -1 (-ENOPERM) since NFA_PUT only fails if there's no
> enough space in the netlink message for the new attribute that
> will be added. Thanks to Patrick McHardy for spotting this.
Actually this is not what I meant. On paths were NFA_PUT is used,
returning -1 is fine because the caller just checks for <0 to
notice an error and the error is not returned to userspace or
something. -ENOMEM is obviously wrong since there is no memory
allocation involved. What I meant was to not return -1 on
the receive path, where NFA_PUT isn't used, but to propagate
the real error from the function call before (I don't remember
which one it was).
Dave, please drop this patch.
next prev parent reply other threads:[~2005-10-08 15:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-07 22:19 [PATCH 1/5] NETFILTER ctnetlink: use ENOMEM instead of -1 Harald Welte
2005-10-08 15:42 ` Patrick McHardy [this message]
2005-10-10 4:52 ` David S. Miller
2005-10-10 8:44 ` Harald Welte
2005-10-10 4:39 ` David S. 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=4347E8F4.5010807@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=laforge@gnumonks.org \
--cc=netfilter-devel@lists.netfilter.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.