]> git.baikalelectronics.ru Git - kernel.git/commit
anon_inodes: mark the anon inode private
authorEric Paris <eparis@redhat.com>
Wed, 10 Mar 2010 03:23:01 +0000 (22:23 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Mar 2010 00:25:23 +0000 (16:25 -0800)
commit73c011971117e1fb08a713d4c34fb5a2a3b6337f
tree8a7e71fa5af7d87784145e14141a997b8a5b6e3f
parent1927a3bfc4b05248859be66a82a4ccf15e6933b0
anon_inodes: mark the anon inode private

Inotify was switched to use anon_inode instead of its own private filesystem
which only had one inode in commit 3bc2f471593b3b "switch inotify_user to
anon_inode"

The problem with this is that now the inotify inode is not a distinct inode
which can be managed by LSMs.  userspace tools which use inotify were allowed
to use the inotify inode but may not have had permission to do read/write type
operations on the anon_inode.  After looking at the anon_inode and its users
it looks like the best solution is to just mark the anon_inode as S_PRIVATE
so the security system will ignore it.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/anon_inodes.c