Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Apr 2017 16:00:59 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Cy Schubert <Cy.Schubert@komquats.com>
Cc:        Konstantin Belousov <kib@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r313495 - head/sys/kern
Message-ID:  <20170409160059.GA75974@FreeBSD.org>
In-Reply-To: <201702100521.v1A5LgfJ003611@slippy.cwsent.com>
References:  <kib@FreeBSD.org> <201702092335.v19NZvSQ026869@repo.freebsd.org> <201702100521.v1A5LgfJ003611@slippy.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 09, 2017 at 09:21:42PM -0800, Cy Schubert wrote:
> In message <201702092335.v19NZvSQ026869@repo.freebsd.org>, Konstantin
> Belousov writes:
> > New Revision: 313495
> > URL: https://svnweb.freebsd.org/changeset/base/313495
> > 
> > Log:
> >   ...
> >   Restructure the block in vn_open_vnode() which handles O_EXLOCK and
> >   O_SHLOCK open flags to make it easier to quit its execution earlier
> >   with an error.
> 
> This broke dhclient. I've attached typescript output at the end of this
> email.
> 
> > @@ -376,20 +384,20 @@ vn_open_vnode(struct vnode *vp, int fmod
> >  		 * Ensure the vnode is still able to be opened for
> >  		 * writing after the lock has been obtained.
> >  		 */
> > -		if (error == 0 && accmode & VWRITE)
> > +		if ((accmode & VWRITE) != 0)
> >  			error = vn_writechk(vp);
> > +		break;
> > +	}

Could it be related to this hunk?  It unconditionally breaks out of the
loop now (missing { } in that `if')?  PVS-Studio trips at here:

/usr/src/sys/kern/vfs_vnops.c:389:1: warning: V612 An unconditional 'break'
within a loop.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170409160059.GA75974>