Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2009 19:17:17 +0400
From:      Chagin Dmitry <dchagin@freebsd.org>
To:        Alexander Best <alexbestms@math.uni-muenster.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: linux syscall get_robust_list causes panic
Message-ID:  <20090614151717.GA26276@dchagin.static.corbina.ru>
In-Reply-To: <permail-20090614142745f7e55a9d00004f58-a_best01@message-id.uni-muenster.de>
References:  <permail-20090614142745f7e55a9d00004f58-a_best01@message-id.uni-muenster.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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