]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] Fix file lookup without ref
authorDipankar Sarma <dipankar@in.ibm.com>
Wed, 19 Apr 2006 17:00:12 +0000 (17:00 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 24 Apr 2006 16:56:05 +0000 (09:56 -0700)
commit95fb678bf90572414b1c2f239c6a44226049ba8a
treeb7246d566793a2672111c598a450ba98fdc55b4e
parentbd6b6027eacb8e5ef633aa0e1c2576dc5a464675
[PATCH] Fix file lookup without ref

There are places in the kernel where we look up files in fd tables and
access the file structure without holding refereces to the file.  So, we
need special care to avoid the race between looking up files in the fd
table and tearing down of the file in another CPU.  Otherwise, one might
see a NULL f_dentry or such torn down version of the file.  This patch
fixes those special places where such a race may happen.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tty_io.c
fs/locks.c
fs/proc/base.c