Andrew Morton <akpm@xxxxxxxx> writes:
Although, I'd rather not lump together unrelated tests without
renaming must_not_trace_exec(). Btw, can someone enlighten me what
this atomic_read() test is all about.
Regards, Olaf.
diff -urN a/security/commoncap.c b/security/commoncap.c
--- a/security/commoncap.c Mon Apr 12 10:38:17 2004
+++ b/security/commoncap.c Mon Apr 12 11:10:38 2004
@@ -118,9 +118,9 @@
static inline int must_not_trace_exec (struct task_struct *p)
{
return ((p->ptrace & PT_PTRACED) && !(p->ptrace & PT_PTRACE_CAP))
- || atomic_read(¤t->fs->count) > 1
- || atomic_read(¤t->files->count) > 1
- || atomic_read(¤t->sighand->count) > 1;
+ || atomic_read(&p->fs->count) > 1
+ || atomic_read(&p->files->count) > 1
+ || atomic_read(&p->sighand->count) > 1;
}
[...]