diff options
author | 2017-01-24 05:44:09 +0000 | |
---|---|---|
committer | 2017-01-24 05:44:09 +0000 | |
commit | d5f1cd9d80011703fc82c11c06938b032cd381c5 (patch) | |
tree | a01bc71c8a05ed7f784156b5b9de5b925adfb691 /sys/lib/libkern/memcpy.c | |
parent | Display process group in "ps /w" since they got removed from "ps /n". (diff) | |
download | wireguard-openbsd-d5f1cd9d80011703fc82c11c06938b032cd381c5.tar.xz wireguard-openbsd-d5f1cd9d80011703fc82c11c06938b032cd381c5.zip |
In accept(2) and accept4(2) allocate a new file descriptor before
checking if the socket head's queue is empty and possibly sleeping.
This way we avoid lock ordering problems as the NET_LOCK() and
fdplock() won't be held at the same time.
Note that socketpair(2) and close(2) are the two remaining syscalls
holding these locks at the same time. They both respect the same
order: fdplock() then NET_LOCK().
Initial deadlock reported by kettenis@ and ajacoutot@.
ok bluhm@, guenther@, deraadt@
Diffstat (limited to 'sys/lib/libkern/memcpy.c')
0 files changed, 0 insertions, 0 deletions