Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2008 12:15:13 -0400
From:      Alexander Kabaev <kabaev@gmail.com>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        emulation@freebsd.org
Subject:   Re: [PATCH]: robust futexes
Message-ID:  <20080430121513.33f9452b@kan.dnsalias.net>
In-Reply-To: <20080430081806.GA81772@freebsd.org>
References:  <20080430081806.GA81772@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/oMoL4G7hkGvU_V/NDbF/fiK
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Wed, 30 Apr 2008 10:18:06 +0200
Roman Divacky <rdivacky@freebsd.org> wrote:

> hi
>=20
> I implemented robust futexes in linuxulator and I need to get it
> reviewed/tested. The best way to test it is (according to linux
> documnetation) to run yum and kill -9 it while it runs.=20
>=20
> The patch is here:
> http://www.vlakno.cz/~rdivacky/linux_robust_futex.patch
>=20
> the patch should be ok as I followed linux code very closely (most of
> the code runs in userspace so kernel has very well defined work). I
> tested it lightly on i386.
>=20
> I'd like to commit this quite soon so please help.
>=20
> thnx!
>=20
> roman
Hi,

some comments:

linux_emul.c:

@@ -86,6 +86,7 @@
 		em =3D malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO);
 		em->pid =3D child;
 		em->pdeath_signal =3D 0;
+		em->robust_futexes =3D NULL;

M_ZERO is not quite zero enough? :)

linux_futex.c in release_futexes:

+	head =3D em->robust_futexes;
+
+	if (fetch_robust_entry(&entry, &head->list.next, &pi))
+		return;

Aren't you taking a fault in copyin unconditionally if
em->robust_mutexes happens to be NULL? Why not check is for NULL first?

Also, is sched_relinguish really necessary after each each futex
recovery _except_ from the 'pending' futex one?

i386/conf/GENERIC:

Does not belong in this patch, probably included in by mistake.



--=20
Alexander Kabaev=09

--Sig_/oMoL4G7hkGvU_V/NDbF/fiK
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iD8DBQFIGJsRQ6z1jMm+XZYRAoi3AJ41OmXtruMzZkjWq0hilw/1tfQpiwCgjNF0
Nnb/0RgrsIZstavXc/cajNE=
=0rK3
-----END PGP SIGNATURE-----

--Sig_/oMoL4G7hkGvU_V/NDbF/fiK--



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