From: tip-bot for Stephen Rothwell <sfr@canb.auug.org.au>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, sfr@canb.auug.org.au, tglx@linutronix.de,
ebiederm@xmission.com
Subject: [tip:sched/numa] sched/numa, userns: Fix user_ns move to ' struct cred'
Date: Wed, 23 May 2012 08:34:01 -0700 [thread overview]
Message-ID: <tip-b51b94a599239de4e3cf769e257a7e87928f20be@git.kernel.org> (raw)
In-Reply-To: <20120521175009.7bd4948c026d8acc61f26753@canb.auug.org.au>
Commit-ID: b51b94a599239de4e3cf769e257a7e87928f20be
Gitweb: http://git.kernel.org/tip/b51b94a599239de4e3cf769e257a7e87928f20be
Author: Stephen Rothwell <sfr@canb.auug.org.au>
AuthorDate: Mon, 21 May 2012 17:50:09 +1000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 23 May 2012 16:30:55 +0200
sched/numa, userns: Fix user_ns move to 'struct cred'
Eliminate obsolete (and to be removed) cred->user-> use.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Link: http://lkml.kernel.org/r/20120521175009.7bd4948c026d8acc61f26753@canb.auug.org.au
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/numa.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/numa.c b/kernel/sched/numa.c
index fdf737d..de66256 100644
--- a/kernel/sched/numa.c
+++ b/kernel/sched/numa.c
@@ -1268,7 +1268,7 @@ static int ng_allowed(struct numa_group *ng, struct task_struct *p)
rcu_read_lock();
tcred = __task_cred(p);
- if (cred->user->user_ns == tcred->user->user_ns &&
+ if (cred->user_ns == tcred->user_ns &&
(cred->uid == tcred->euid &&
cred->uid == tcred->suid &&
cred->uid == tcred->uid &&
@@ -1276,7 +1276,7 @@ static int ng_allowed(struct numa_group *ng, struct task_struct *p)
cred->gid == tcred->sgid &&
cred->gid == tcred->gid))
goto ok;
- if (ns_capable(tcred->user->user_ns, CAP_SYS_PTRACE))
+ if (ns_capable(tcred->user_ns, CAP_SYS_PTRACE))
goto ok;
rcu_read_unlock();
return -EPERM;
prev parent reply other threads:[~2012-05-23 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 7:50 linux-next: build failure after merge of the userns tree Stephen Rothwell
2012-05-21 22:05 ` Eric W. Biederman
2012-05-23 15:34 ` tip-bot for Stephen Rothwell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-b51b94a599239de4e3cf769e257a7e87928f20be@git.kernel.org \
--to=sfr@canb.auug.org.au \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome