From owner-freebsd-current@FreeBSD.ORG Sun Jun 14 15:34:49 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1CC5106564A for ; Sun, 14 Jun 2009 15:34:49 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 7D4EB8FC1F for ; Sun, 14 Jun 2009 15:34:49 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id D44AAA0296; Sun, 14 Jun 2009 19:17:22 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1829531595; Sun, 14 Jun 2009 19:17:22 +0400 Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n5EFHMNA026420; Sun, 14 Jun 2009 19:17:22 +0400 (MSD) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n5EFHHJf026419; Sun, 14 Jun 2009 19:17:17 +0400 (MSD) (envelope-from dchagin) Date: Sun, 14 Jun 2009 19:17:17 +0400 From: Chagin Dmitry To: Alexander Best Message-ID: <20090614151717.GA26276@dchagin.static.corbina.ru> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-current@freebsd.org Subject: Re: linux syscall get_robust_list causes panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 15:34:50 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 14, 2009 at 04:27:45PM +0200, Alexander Best wrote: > hi there, >=20 > i tried to run the latest release (20090531) of the linux test project (l= tp) > with emulators/linux_dist-gentoo-stage3. however the kernel panics after = ltp's > get_robust_list(2) test. set_robust_list(2) passes without any problems. >=20 > i've attached a screenshot of the panic and the source which is causing t= he > panic. you won't be able to compile it without ltp however. after install= ing > and compiling ltp the source and the executable can be found in > "/usr/local/gentoo-stage3/ltp-full-20090531/testcases/kernel/syscalls/get= _robust_list". > simply running the > "/usr/local/gentoo-stage3/ltp-full-20090531/testcases/kernel/syscalls/get= _robust_list/get_robust_list01" > executable results in a panic. >=20 > unfortunately i cannot supply a complete bt, because i only own a usb key= board > which doesn't respond after the panic. actually i'm a bit surprised the > debugger was started, because i have "KDB_UNATTENDED" in my kernel conf. = any > reason the machine doesn't reboot and save the dump to /var/crash/vmcore.= *? >=20 please, try inlined patch. diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index cb04cd8..0f781fc 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -707,8 +707,10 @@ linux_get_robust_list(struct thread *td, struct linux_= get_robust_list_args *args /* XXX: ptrace? */ if (priv_check(td, PRIV_CRED_SETUID) ||=20 priv_check(td, PRIV_CRED_SETEUID) || - p_candebug(td, p)) + p_candebug(td, p)) { + PROC_UNLOCK(p); return (EPERM); + } head =3D em->robust_futexes; =09 PROC_UNLOCK(p); --=20 Have fun! chd --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAko1FHwACgkQ0t2Tb3OO/O37DACfT2a3X+nsrt4tuqEaImv/EFiq 0/wAoLv/C8DJkb5GHNY7/tpEhuPccvRR =P0zv -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--