]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Fix file lookup without ref
authorDipankar Sarma <dipankar@in.ibm.com>
Wed, 19 Apr 2006 05:21:46 +0000 (22:21 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 19 Apr 2006 16:13:51 +0000 (09:13 -0700)
commitd02a182db99e8bc85ccc6e107a615def0518b03b
treee417b4c456ae31dc1dde8027b6be44a1a9f19395
parent22f2e9cb6b078c9ff3dc6fd37a8deb15954aac4f
[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>
drivers/char/tty_io.c
fs/locks.c
fs/proc/base.c