CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/06/11 07:23:18
Modified files:
sys/kern : kern_descrip.c
Log message:
Move FRELE() outside fdplock in dup*(2) code. This avoids a potential
lock order issue with the file close path.
The FRELE() can trigger the close path during dup*(2) if another thread
manages to close the file descriptor simultaneously. This race is
possible because the file reference is taken before the file descriptor
table is locked for write access.
Vitaliy Makkoveev agrees
OK anton@ mpi@