Skip to content

Commit

Permalink
Annotate struct fs_struct's usage count restriction
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Howells authored and Linus Torvalds committed Mar 29, 2009
1 parent 7c2c7d9 commit 795e2fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/linux/fs_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 795e2fe

Please sign in to comment.