]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
On exec, single-threading must be enforced before arguments space is
authorkib <kib@FreeBSD.org>
Sun, 10 May 2015 09:00:40 +0000 (09:00 +0000)
committerkib <kib@FreeBSD.org>
Sun, 10 May 2015 09:00:40 +0000 (09:00 +0000)
commitf3713229833ccaa3860b3ed139ae4c79f529646e
tree064d76e5d8ad1ce92f3fa8db469f737a43503979
parent00145bc0e070efc612952cdad12ecdb18cd7629a
On exec, single-threading must be enforced before arguments space is
allocated from exec_map.  If many threads try to perform execve(2) in
parallel, the exec map is exhausted and some threads sleep
uninterruptible waiting for the map space.  Then, the thread which won
the race for the space allocation, cannot single-thread the process,
causing deadlock.

Reported and tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
sys/amd64/linux32/linux32_machdep.c
sys/compat/freebsd32/freebsd32_misc.c
sys/compat/svr4/svr4_misc.c
sys/i386/ibcs2/ibcs2_misc.c
sys/i386/linux/linux_machdep.c
sys/kern/kern_exec.c
sys/sys/imgact.h