https://github.com/torvalds/linux
Revision c3724b129b5a1a1789a2dc5348685a236ae02479 authored by Jeff Mahoney on 12 April 2007, 06:28:46 UTC, committed by Linus Torvalds on 12 April 2007, 22:31:42 UTC
Commit f50b6f8691cae2e0064c499dd3ef3f31142987f0 introduced a race in
autofs4 between autofs_lookup_unhashed() and autofs_dentry_release().

autofs_dentry_release() ends up clearing the ->dentry and ->inode members
of autofs_info before removing it from the rehash list.  The list is
protected by the rehash lock in both functions, but since
autofs_dentry_release() starts tearing the autofs_info struct down before
removing it from the list, autofs_lookup_unhashed() can get a autofs_info
with a NULL dentry.

This patch moves the clearing of ->dentry and ->inode after the removal
from the rehash list.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 6d205f1
History
Tip revision: c3724b129b5a1a1789a2dc5348685a236ae02479 authored by Jeff Mahoney on 12 April 2007, 06:28:46 UTC
[PATCH] autofs4: fix race in unhashed dentry code
Tip revision: c3724b1
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 572 bytes
.mailmap -rw-r--r-- 3.5 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.9 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 82.3 KB
Makefile -rw-r--r-- 49.1 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top