TOMOYO: Fix pathname handling of disconnected paths.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 8 Dec 2011 12:24:06 +0000 (21:24 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Dec 2011 20:58:28 +0000 (12:58 -0800)
commitf55f75a191f661f652920f788501e6546a60c3f5
tree500be84f6c02d28d8499bb26c88fbde0589ffb11
parent0e70f402bc3d69cb2c9607dc4216698b564a53b9
TOMOYO: Fix pathname handling of disconnected paths.

commit 1418a3e5ad4d01b1d4abf2c479c50b0cedd59e3f upstream.

Current tomoyo_realpath_from_path() implementation returns strange pathname
when calculating pathname of a file which belongs to lazy unmounted tree.
Use local pathname rather than strange absolute pathname in that case.

Also, this patch fixes a regression by commit 02125a82 "fix apparmor
dereferencing potentially freed dentry, sanitize __d_path() API".

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/tomoyo/realpath.c