From: David Howells Date: Sat, 28 Mar 2009 23:23:01 +0000 (+0000) Subject: Annotate struct fs_struct's usage count restriction X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=795e2fe0a3b69dbc040d7efcf517e0cbad6901d0;p=linux-2.6-omap-h63xx.git Annotate struct fs_struct's usage count restriction 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 Signed-off-by: Hugh Dickins Cc: stable@kernel.org Signed-off-by: Linus Torvalds --- 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 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;