From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] netlink: invert error code in netlink_set_err()
Date: Wed, 04 Mar 2009 11:13:50 +0100 [thread overview]
Message-ID: <49AE545E.8090208@trash.net> (raw)
In-Reply-To: <20090303233535.7346.25867.stgit@Decadence>
Pablo Neira Ayuso wrote:
> The callers of netlink_set_err() currently pass a negative value
> as parameter for the error code. However, sk->sk_err wants a
> positive error value. Without this patch, skb_recv_datagram() called
> by netlink_recvmsg() may return a positive value to report an error.
>
> Another choice to fix this is to change callers to pass a positive
> error value, but this seems a bit inconsistent and error prone
> to me. Indeed, the callers of netlink_set_err() assumed that the
> (usual) negative value for error codes was fine before this patch :).
Amazing how this kept hidden for so long. I could have sworn I've
already seen the notification errors in userspace :)
prev parent reply other threads:[~2009-03-04 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 23:35 [PATCH] netlink: invert error code in netlink_set_err() Pablo Neira Ayuso
2009-03-04 7:37 ` David Miller
2009-03-04 10:13 ` Patrick McHardy [this message]
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=49AE545E.8090208@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@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 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).