netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Miller <davem@davemloft.net>, torvalds@linux-foundation.org
Cc: marcel@holtmann.org, sfeldma@gmail.com, netdev@vger.kernel.org,
	johannes@sipsolutions.net, teg@jklm.no
Subject: Re: Problem with patch "make nlmsg_end() and genlmsg_end() void"
Date: Wed, 08 Apr 2015 13:03:22 +0100	[thread overview]
Message-ID: <1428494602.9010.11.camel@infradead.org> (raw)
In-Reply-To: <20150118.233722.226468667930444145.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]

On Sun, 2015-01-18 at 23:37 -0500, David Miller wrote:
> From: Marcel Holtmann <marcel@holtmann.org>
> Date: Sun, 18 Jan 2015 18:10:46 -0800
> 
> > Hi Scott,
> > 
> >> This patch needs to be reverted ASAP.  git bisect landed me here also;
> >> my processes are getting the OOM msgs.  What testing was done?
> >> 
> >> Seems someone does care that nlmsg_end() returns skb->len.
> > 
> > I still wonder how this affects userspace. I have not figured that
> > out. Something goes wrong pretty badly somewhere.
> > 
> > Have you tried the small diff with the two locations that were
> > problematic for me?
> 
> There were a lot more cases not converted properly, I hope the
> patch below gets them all.
> 
> Johannes, this was either not tested or tested very poorly, please
> don't submit changes like this.  Even neighbour entry and route
> dumping were hosed.
> 
> ====================
> [PATCH] netlink: Fix bugs in nlmsg_end() conversions.
> 
> Commit 053c095a82cf ("netlink: make nlmsg_end() and genlmsg_end()
> void") didn't catch all of the cases where callers were breaking out
> on the return value being equal to zero, which they no longer should
> when zero means success.
> 
> Fix all such cases.

I'm not sure if this is entirely fixed. In Fedora 22 (4.0.0-rc5-git4)
I'm occasionally seeing glibc deadlock in __check_pf() on a netlink
recvmsg(), here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/check_pf.c;h=162606d7;hb=glibc-2.21#l166

As I understand it, this shouldn't happen. Even if messages are
dropped (which surely shouldn't happen as often as I'm seeing this),
glibc should get ENOBUFS from the recvmsg() call.

https://bugzilla.redhat.com/show_bug.cgi?id=1209433

I haven't bisected and proved that it *was* this commit which
introduced the problem, as it only happens after a day or two of
running Evolution and I haven't managed to trigger it more reliably.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5745 bytes --]

  parent reply	other threads:[~2015-04-08 12:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 11:44 Problem with patch "make nlmsg_end() and genlmsg_end() void" Marcel Holtmann
2015-01-18 23:44 ` Marcel Holtmann
2015-01-19  1:53   ` Scott Feldman
2015-01-19  2:10     ` Marcel Holtmann
2015-01-19  4:37       ` David Miller
2015-01-19  9:31         ` Scott Feldman
2015-04-08 12:03         ` David Woodhouse [this message]
2015-04-08 13:08           ` Johannes Berg
2015-04-08 14:12             ` David Woodhouse
2015-04-20 14:30               ` David Woodhouse
2015-06-09 13:34             ` David Woodhouse
2015-06-10  0:49               ` Eric Dumazet
2015-06-11  0:31                 ` David Woodhouse
2015-06-11  7:16                   ` David Miller
2015-06-11 22:03                   ` David Woodhouse
2015-06-18  6:38                     ` David Woodhouse
2015-01-19  8:53       ` Johannes Berg

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=1428494602.9010.11.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@gmail.com \
    --cc=teg@jklm.no \
    --cc=torvalds@linux-foundation.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).