git: kernel - Fix kernel panic caused by rename race
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Feb 1 13:50:05 PST 2013
commit e2a099cf1b1188b60aecc18de449444f7dca0f6a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Feb 1 13:47:37 2013 -0800
kernel - Fix kernel panic caused by rename race
* kern_rename() must temporarily unlock the source ncp when resolving the
target ncp, and will sometimes have to temporarily unlock the target ncp
when relocking both. This can race against a topological removal of one
or both ncp's, resulting in incorrect operation or a panic due to a
NULL vp.
* Detect the case and return EAGAIN if the ncp's have been marked NCF_DESTROYED
or if fromncp loses its vp resolution. Callers detect the EAGAIN and retry
the operation.
Reported-by: ftigeot
Summary of changes:
sys/emulation/linux/linux_file.c | 18 +++++++------
sys/kern/vfs_syscalls.c | 58 +++++++++++++++++++++++++++-------------
2 files changed, 50 insertions(+), 26 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e2a099cf1b1188b60aecc18de449444f7dca0f6a
--
DragonFly BSD source repository
More information about the Commits
mailing list