diff options
author | David Howells <dhowells@redhat.com> | 2009-03-28 23:23:01 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-08 15:45:06 -0700 |
commit | 93bbc47381a97175fe64c7e2bd1fee8b9fc2ac5f (patch) | |
tree | fae5e7ee6de8aa5f56b20c7f7205825e9cf3e7a2 /include | |
parent | 6560e7a44e83e8dd111c64e3ed77ad08d2550e23 (diff) |
Annotate struct fs_struct's usage count restriction
commit 795e2fe0a3b69dbc040d7efcf517e0cbad6901d0 upstream.
Annotate struct fs_struct's usage count to indicate the restrictions upon it.
It may not be incremented, except by clone(CLONE_FS), as this affects the
check in check_unsafe_exec() in fs/exec.c.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs_struct.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index a97c053d3a9..18b467dbe27 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h @@ -4,7 +4,10 @@ #include <linux/path.h> struct fs_struct { - atomic_t count; + atomic_t count; /* This usage count is used by check_unsafe_exec() for + * security checking purposes - therefore it may not be + * incremented, except by clone(CLONE_FS). + */ rwlock_t lock; int umask; struct path root, pwd; |