Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2017 08:59:42 -0800
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r313909 - head/sys/kern
Message-ID:  <9e48d2b2-5064-3293-e8e0-b4959f58507b@FreeBSD.org>
In-Reply-To: <201702180507.v1I57rOM008704@repo.freebsd.org>
References:  <201702180507.v1I57rOM008704@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t
Content-Type: multipart/mixed; boundary="7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Message-ID: <9e48d2b2-5064-3293-e8e0-b4959f58507b@FreeBSD.org>
Subject: Re: svn commit: r313909 - head/sys/kern
References: <201702180507.v1I57rOM008704@repo.freebsd.org>
In-Reply-To: <201702180507.v1I57rOM008704@repo.freebsd.org>

--7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 2/17/2017 9:07 PM, Bryan Drewery wrote:
> Author: bdrewery
> Date: Sat Feb 18 05:07:53 2017
> New Revision: 313909
> URL: https://svnweb.freebsd.org/changeset/base/313909
>=20
> Log:
>   Fix panic with unlocked vnode to vrecycle().
>  =20
>   MFC after:	2 weeks
>=20
> Modified:
>   head/sys/kern/uipc_mqueue.c
>=20
> Modified: head/sys/kern/uipc_mqueue.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/kern/uipc_mqueue.c	Sat Feb 18 01:52:10 2017	(r313908)
> +++ head/sys/kern/uipc_mqueue.c	Sat Feb 18 05:07:53 2017	(r313909)
> @@ -714,7 +714,9 @@ do_recycle(void *context, int pending __
>  {
>  	struct vnode *vp =3D (struct vnode *)context;
> =20
> +	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
>  	vrecycle(vp);
> +	VOP_UNLOCK(vp, 0);
>  	vdrop(vp);
>  }
> =20
>=20

Just looking at this, it seemed questionable and most likely bitrotted.
I added the lock to avoid an assertion to unblock me and allow the
module to be used by others with INVARIANTS.  Most of the vnode handling
here is from the initial commit, long before a lot of refactoring around
vnode lifecycle management.  It does appear to need someone more
familiar with vnode handling to go through and clean it up.


--=20
Regards,
Bryan Drewery


--7k03QUvuRuMOUpr5ifn7kqWaP2Sg2mxkI--

--DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJYrHH+AAoJEDXXcbtuRpfPAn0H/iIm6+SBCboLL/G+5A0/8EBb
1hajAQ7RoXJoWYbeNy4XF2EaHUeWTAb/zCxj33l9AeVLTMRUdENCP9fU/YWdvtGZ
0vFB9fcphVJfRGoTq6reY7CUuwBTXItg+9onVV7ntC4s18e7zneSSyW1GTtC+Nt/
KOj0A6DkziphW1UHvMf1X+yapjU1Dc3QVZMKCIzWnRSCc1CN4rUPVZg0ZXsxJBhQ
u7pxo6QygIvxNrODdqPPblDsGQJOLUINIhjw0GwT7KgKi4fMNJ4cNpKSXc48CUg9
1MS6OPc2so8uRTzCZ3PQNRHnbvD7eYzhWsg8DFrMNCfsTkXu4L6EB+i99aq4CXc=
=yR4F
-----END PGP SIGNATURE-----

--DGgnjOocaJGIdWiCv46cbsVgwiT7q5t8t--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e48d2b2-5064-3293-e8e0-b4959f58507b>