public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Regression in 4.6.0-git - bisected to commit dd254f5a382c
Date: Tue, 24 May 2016 01:18:54 +0100	[thread overview]
Message-ID: <20160524001854.GW14480@ZenIV.linux.org.uk> (raw)
In-Reply-To: <57437683.30008@lwfinger.net>

On Mon, May 23, 2016 at 04:30:43PM -0500, Larry Finger wrote:
> The mainline kernels past 4.6.0 fail hang when logging in. There are no
> error messages, and the machine seems to be waiting for some event that
> never happens.
> 
> The problem has been bisected to commit dd254f5a382c ("fold checks into
> iterate_and_advance()"). The bisection has been verified.
> 
> The problem is the call from iov_iter_advance(). When I reinstated the old
> macro with a new name and used it in that routine, the system works.
> Obviously, the call that seems to be incorrect has some benefits. My
> quich-and-dirty patch is attached.
> 
> I will be willing to test any patch you prepare.

Hangs where and how?  A reproducer, please...  This is really weird - the
only change there is in the cases when
	* iov_iter_advance(i, n) is called with n greater than the remaining
amount.  It's a bug, plain and simple - old variant would've been left in
seriously buggered state and at the very least we want to catch any such
places for the sake of backports
	* iov_iter_advance(i, 0) - both old and new code leave *i unchanged,
but the old one dereferences i->iov[0], which be pointing beyond the end of
array by that point.  The value read from there was not used by the old code,
at that.

	Could you slap WARN_ON(size > i->count) in the very beginning of
iov_iter_advance() (the mainline variant) and see what triggers on your
reproducer?

  reply	other threads:[~2016-05-24  0:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 21:30 Regression in 4.6.0-git - bisected to commit dd254f5a382c Larry Finger
2016-05-24  0:18 ` Al Viro [this message]
2016-05-24  2:55   ` Larry Finger
2016-05-24 16:10   ` Larry Finger
2016-05-24 16:28     ` Al Viro
2016-05-24 18:39       ` Larry Finger
2016-05-24 19:13     ` Matthew McClintock
2016-05-24 19:16       ` Larry Finger
2016-05-24 19:25         ` Matthew McClintock
2016-05-24 19:36           ` Larry Finger
2016-05-24 22:31             ` Matthew McClintock
2016-05-24 23:41               ` Al Viro
2016-05-25  0:58                 ` Matthew McClintock
2016-05-25  1:10                   ` Al Viro
2016-05-25  1:20                     ` Matthew McClintock
2016-05-25  1:28                       ` Al Viro
2016-05-25  2:06                         ` Matthew McClintock
2016-05-25  3:21                           ` Al Viro
2016-05-25  6:24                 ` Al Viro
2016-05-25 14:28                   ` Larry Finger
2016-05-25 15:27                   ` Matthew McClintock

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=20160524001854.GW14480@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-kernel@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