Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418004

Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an error

From Ian Kent <raven@themaw.net>
Newsgroups linux.kernel
Subject Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an error
Date 2016-06-09 03:30 +0200
Message-ID <rHWXf-7Qf-3@gated-at.bofh.it> (permalink)
References <riZEZ-87C-1@gated-at.bofh.it> <rj1Qt-14I-11@gated-at.bofh.it> <rC63f-2R9-1@gated-at.bofh.it> <rC9ua-4YA-13@gated-at.bofh.it> <rEop3-8vh-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2016-05-30 at 13:52 +0800, Ian Kent wrote:
> On Tue, 2016-05-24 at 09:34 +0800, Ian Kent wrote:
> > On Mon, 2016-05-23 at 14:50 -0700, Andrei Vagin wrote:
> > > Hi Ian,
> > > 
> > > When are you going to apply this patch? We can't test linux-next without
> > > it.
> > 
> > I though I sent this with the last series but I can't see that I have.
> > 
> > I have the rest of that series to send over to Andrew which I was planning
> > to
> > do
> > after the current merge window closes (which is about now I guess).
> > 
> > I'll include it in that series.
> > Sorry for the hold up, ;)
> 
> Some bad news I'm afraid.
> 
> I was getting ready to send these over to Andrew and found that opendir(3) is
> failing on a number of tests (51 of 230, 9 fails are expected) with 4.6.0.
> 
> It's not the patches, yours or mine and it doesn't happen with 4.4.x kernels.
> 
> Looks like I'm going to have to bisect to work out what's going on and that
> will
> take a while.

The regression has been fixed now.

Al Viro sent a patch for it to Linus yesterday, it's commit e6ec03a25f1 in the
Linux tree.

I can send my patches to Andrew (after re-testing) but any autofs related
testing of linux.next will need the above commit.

Andrew, surely this isn't the first time this type of problem has happened, how 
is it usually handled, what do I need to do to make this go smoothly?

> 
> > 
> > Ian
> > 
> > > 
> > > Thanks,
> > > Andrew
> > > 
> > > 
> > > On Fri, Apr 1, 2016 at 12:37 AM, Ian Kent <raven@themaw.net> wrote:
> > > > On Thu, 2016-03-31 at 22:12 -0700, Andrey Vagin wrote:
> > > > > From: Andrey Vagin <avagin@openvz.org>
> > > > > 
> > > > > __vfs_write() returns a negative value in a error case.
> > > > 
> > > > Ha, right, I'll send this along to Andrew with my next series which
> > > > should be soon.
> > > > 
> > > > > 
> > > > > Cc: Ian Kent <raven@themaw.net>
> > > > > Signed-off-by: Andrey Vagin <avagin@openvz.org>
> > > > > ---
> > > > >  fs/autofs4/waitq.c | 7 ++++---
> > > > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > > > 
> > > > > diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
> > > > > index 0146d91..631f155 100644
> > > > > --- a/fs/autofs4/waitq.c
> > > > > +++ b/fs/autofs4/waitq.c
> > > > > @@ -66,11 +66,12 @@ static int autofs4_write(struct autofs_sb_info
> > > > > *sbi,
> > > > >       set_fs(KERNEL_DS);
> > > > > 
> > > > >       mutex_lock(&sbi->pipe_mutex);
> > > > > -     wr = __vfs_write(file, data, bytes, &file->f_pos);
> > > > > -     while (bytes && wr) {
> > > > > +     while (bytes) {
> > > > > +             wr = __vfs_write(file, data, bytes, &file->f_pos);
> > > > > +             if (wr <= 0)
> > > > > +                     break;
> > > > >               data += wr;
> > > > >               bytes -= wr;
> > > > > -             wr = __vfs_write(file, data, bytes, &file->f_pos);
> > > > >       }
> > > > >       mutex_unlock(&sbi->pipe_mutex);
> --
> To unsubscribe from this list: send the line "unsubscribe autofs" in

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an  error Ian Kent <raven@themaw.net> - 2016-06-09 03:30 +0200
  Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an error Andrei Vagin <avagin@gmail.com> - 2016-06-09 19:30 +0200
    Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an  error Ian Kent <raven@themaw.net> - 2016-06-10 10:50 +0200
  Re: [PATCH] autofs: don't stuck in a loop if vfs_write returns an  error Andrew Morton <akpm@linux-foundation.org> - 2016-06-10 21:10 +0200

csiph-web