提交 795e2fe0 编写于 作者: D David Howells 提交者: Linus Torvalds

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: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NHugh Dickins <hugh@veritas.com>
Cc: stable@kernel.org
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7c2c7d99
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册