Messages in this thread | | | From | Andi Kleen <> | Subject | Re: [Security] [PATCH 2/2] taskstats: restrict access to user | Date | Mon, 19 Sep 2011 11:29:28 -0700 |
| |
Linus Torvalds <torvalds@linux-foundation.org> writes: > rc = parse(info->attrs[TASKSTATS_CMD_ATTR_REGISTER_CPUMASK], mask); > diff --git a/kernel/tsacct.c b/kernel/tsacct.c > index 24dc60d9fa1f..110ca5a03bd6 100644 > --- a/kernel/tsacct.c > +++ b/kernel/tsacct.c > @@ -78,6 +78,7 @@ void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk) > > #define KB 1024
Needs to be 1024ULL, because the counters are 64bit.
> #define MB (1024*KB) > +#define KB_MASK (~(KB-1))
Otherwise you lose the upper 32bits here.
-Andi
-- ak@linux.intel.com -- Speaking for myself only
| |