git: kernel - Fix SMP race against fp seek position lock
dillon at crater.dragonflybsd.org
Fri May 29 14:13:55 PDT 2015
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri May 29 14:09:37 2015 -0700
kernel - Fix SMP race against fp seek position lock
* Fix a SMP race against write-appends. Atomic ops are used on the
struct file->f_flag field to interlock write-append operations.
However, the fcntl() and flock() code was also modifying file->f_flag
using non-atomic ops.
* Fix fcntl() and flock() to use atomic ops.
* Problem could lead to processes stuck forever in "fpoff".
Reported-by: Sevan Janiyan
Summary of changes:
sys/kern/kern_descrip.c | 18 ++++++++++++++----
sys/kern/vfs_syscalls.c | 4 ++--
2 files changed, 16 insertions(+), 6 deletions(-)
DragonFly BSD source repository
More information about the Commits