[PATCH] fs/namei.c: Call to file_permission() under a spinlock in do_lookup_path()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 4 Jun 2006 09:51:37 +0000 (02:51 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 5 Jun 2006 19:29:16 +0000 (12:29 -0700)
commit6d09bb627d2470299dfb1af0e6d27fb4aece9196
treece62b91f11c5df5fbee41aa053b33add79c2c37a
parentc7d2d28b9851d0ffc9924b0e36bac806d18ebf25
[PATCH] fs/namei.c: Call to file_permission() under a spinlock in do_lookup_path()

From: Trond Myklebust <Trond.Myklebust@netapp.com>

We're presently running lock_kernel() under fs_lock via nfs's ->permission
handler.  That's a ranking bug and sometimes a sleep-in-spinlock bug.  This
problem was introduced in the openat() patchset.

We should not need to hold the current->fs->lock for a codepath that doesn't
use current->fs.

[vsu@altlinux.ru: fix error path]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/namei.c