lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a8748490612080635o3432d410gbb147c977de21499@mail.gmail.com>
Date:	Fri, 8 Dec 2006 15:35:15 +0100
From:	"Jesper Juhl" <jesper.juhl@...il.com>
To:	"Neil Brown" <neilb@...e.de>
Cc:	linux-kernel@...r.kernel.org,
	"Trond Myklebust" <trond.myklebust@....uio.no>,
	nfs@...ts.sourceforge.net
Subject: Re: Let's get rid of those annoying "VFS is out of sync with lock manager" messages (includes proposed patch)

On 08/12/06, Neil Brown <neilb@...e.de> wrote:
> On Thursday December 7, jesper.juhl@...il.com wrote:
> >
> > So I took Neils patch, made the change Trond suggested and the result is
> > below.
> >
> > Comments?  Ok to merge?
>
> Yes, except that you need a changelog comment at the top.  Possibly
> based very heavily on the text I wrote, but written to justify the
> patch rather than to explain the bug.
>
> NeilBrown
>

How about this for a changelog entry?  :

Convert "VFS is out of sync with lock manager!" printk in
do_vfs_lock() to dprintk() since the message is useless in normal use
but could possibly be useful as a debugging aid.
Also turn off FL_SLEEP when calling do_vfs_lock() just in case after
getting -EINTR or -ERESTARTSYS.


> >
> >
> > Signed-off-by: Neil Brown <neilb@...e.de>
> > Signed-off-by: Jesper Juhl <jesper.juhl@...il.com>
> > ---
> >
> >  fs/nfs/file.c |   11 +++++++----
> >  1 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> > index cc93865..22572af 100644
> > --- a/fs/nfs/file.c
> > +++ b/fs/nfs/file.c
> > @@ -428,8 +428,8 @@ static int do_vfs_lock(struct file *file
> >                       BUG();
> >       }
> >       if (res < 0)
> > -             printk(KERN_WARNING "%s: VFS is out of sync with lock manager!\n",
> > -                             __FUNCTION__);
> > +             dprintk("%s: VFS is out of sync with lock manager (res = %d)!\n",
> > +                             __FUNCTION__, res);
> >       return res;
> >  }
> >
> > @@ -479,10 +479,13 @@ static int do_setlk(struct file *filp, i
> >                * we clean up any state on the server. We therefore
> >                * record the lock call as having succeeded in order to
> >                * ensure that locks_remove_posix() cleans it out when
> > -              * the process exits.
> > +              * the process exits. Make sure not to sleep if
> > +              * someone else holds the lock.
> >                */
> > -             if (status == -EINTR || status == -ERESTARTSYS)
> > +             if (status == -EINTR || status == -ERESTARTSYS) {
> > +                     fl->fl_flags &= ~FL_SLEEP;
> >                       do_vfs_lock(filp, fl);
> > +             }
> >       } else
> >               status = do_vfs_lock(filp, fl);
> >       unlock_kernel();
> >
>


-- 
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ