1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00
freebsd/sys/compat
Konstantin Belousov 066d836b02 Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month
2009-10-27 10:55:34 +00:00
..
freebsd32 Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
ia32 Make sure that the primary native brandinfo always gets added 2009-10-03 11:57:21 +00:00
linprocfs Fix a few panics in linuxulator + VIMAGE due to curvnet not being set. 2009-08-28 22:51:07 +00:00
linsysfs Add a pn_destroy field to pfs_node. This field points to a destructor 2007-03-12 12:16:52 +00:00
linux Unconditionally call the setsockopt for IPV6_V6ONLY for v6 linux sockets 2009-10-25 09:58:56 +00:00
ndis provides a extra write buffer when the NDIS driver want to send a 2009-06-26 01:42:41 +00:00
netbsd
svr4 As jhb@ pointed out to me, r197057 was incorrect, not least because these 2009-09-10 13:20:27 +00:00
x86bios Fix a copy-and-pasto in the previous commit. 2009-10-19 21:01:42 +00:00