netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Pfaff <blp@nicira.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] netlink: Fix netlink_recvmsg() handling of error from netlink_dump().
Date: Wed, 9 Jul 2014 10:32:54 -0700	[thread overview]
Message-ID: <20140709173254.GD4291@nicira.com> (raw)
In-Reply-To: <20140707.193735.766947638929765410.davem@davemloft.net>

On Mon, Jul 07, 2014 at 07:37:35PM -0700, David Miller wrote:
> From: Ben Pfaff <blp@nicira.com>
> Date: Mon, 30 Jun 2014 15:35:04 -0700
> 
> > netlink_dump() returns a negative errno value on error.  Until now,
> > netlink_recvmsg() directly recorded that negative value in sk->sk_err,
> > but that's wrong since sk_err takes positive errno values.  (This manifests
> > as userspace receiving a positive return value from the recv() system call,
> > falsely indicating success.)
> > 
> > This bug was introduced in the commit that started checking the
> > netlink_dump() return value, commit b44d211 (netlink: handle errors from
> > netlink_dump()).
> > 
> > Multithreaded Netlink dumps are one way to trigger this behavior in
> > practice, as described in the commit message for the userspace workaround
> > posted here:
> >     http://openvswitch.org/pipermail/dev/2014-June/042339.html
> > 
> > Signed-off-by: Ben Pfaff <blp@nicira.com>
> 
> There's another place, later in this file, doing the same exact thing.
> 
> Please respin this patch, fixing that location too.

Thanks for pointing that out, I sent out v2.

      reply	other threads:[~2014-07-09 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 22:35 [PATCH] netlink: Fix netlink_recvmsg() handling of error from netlink_dump() Ben Pfaff
2014-07-08  2:37 ` David Miller
2014-07-09 17:32   ` Ben Pfaff [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=20140709173254.GD4291@nicira.com \
    --to=blp@nicira.com \
    --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 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).