From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 21:16:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99B611065687; Sat, 14 Feb 2009 21:16:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 3957C8FC0A; Sat, 14 Feb 2009 21:16:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LYRsB-00088D-PV; Sat, 14 Feb 2009 23:16:27 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n1ELGPs9061615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 14 Feb 2009 23:16:25 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n1ELGOqe064789; Sat, 14 Feb 2009 23:16:24 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n1ELGO6Q064785; Sat, 14 Feb 2009 23:16:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 14 Feb 2009 23:16:24 +0200 From: Kostik Belousov To: Joe Marcus Clarke Message-ID: <20090214211624.GS2723@deviant.kiev.zoral.com.ua> References: <200902142112.n1ELCOJg030474@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TMgB3/Ch1aWgZB1L" Content-Disposition: inline In-Reply-To: <200902142112.n1ELCOJg030474@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LYRsB-00088D-PV 22c373e5dfbd4e894c91533a492065e7 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r188613 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 21:16:30 -0000 --TMgB3/Ch1aWgZB1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 14, 2009 at 09:12:24PM +0000, Joe Marcus Clarke wrote: > Author: marcus (doc,ports committer) > Date: Sat Feb 14 21:12:24 2009 > New Revision: 188613 > URL: http://svn.freebsd.org/changeset/base/188613 >=20 > Log: > Change two KASSERTS to printfs and simple returns. Stress testing has > revealed that a process' current working directory can be VBAD if the > directory is removed. This can trigger a panic when procstat -f PID is > run. > =20 > Tested by: pho > Discovered by: phobot > Reviewed by: kib > Approved by: kib >=20 > Modified: > head/sys/kern/kern_descrip.c >=20 > Modified: head/sys/kern/kern_descrip.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/kern_descrip.c Sat Feb 14 21:08:40 2009 (r188612) > +++ head/sys/kern/kern_descrip.c Sat Feb 14 21:12:24 2009 (r188613) > @@ -2532,7 +2532,12 @@ export_vnode_for_osysctl(struct vnode *v > kif->kf_fd =3D type; > kif->kf_type =3D KF_TYPE_VNODE; > /* This function only handles directories. */ > - KASSERT(vp->v_type =3D=3D VDIR, ("export_vnode_for_osysctl: vnode not d= irectory")); > + if (vp->v_type !=3D VDIR) { > + printf("export_vnode_for_osysctl: vnode not directory: %d\n", > + vp->v_type); > + vrele(vp); > + return (ENOTDIR); > + } > kif->kf_vnode_type =3D KF_VTYPE_VDIR; > =20 > /* > @@ -2779,7 +2784,12 @@ export_vnode_for_sysctl(struct vnode *vp > kif->kf_fd =3D type; > kif->kf_type =3D KF_TYPE_VNODE; > /* This function only handles directories. */ > - KASSERT(vp->v_type =3D=3D VDIR, ("export_vnode_for_sysctl: vnode not di= rectory")); > + if (vp->v_type !=3D VDIR) { > + printf("export_vnode_for_sysctl: vnode not directory: %d\n", > + vp->v_type); > + vrele(vp); > + return (ENOTDIR); > + } > kif->kf_vnode_type =3D KF_VTYPE_VDIR; > =20 > /* You are fast. Do we need these printf ? --TMgB3/Ch1aWgZB1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmXNKgACgkQC3+MBN1Mb4i26QCeMFBrJYiZ69U6AiTKorGu/bXE u44AoOjEldye7BA1IB01q1BoPS0Yb689 =87vL -----END PGP SIGNATURE----- --TMgB3/Ch1aWgZB1L--