linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the akpm with the  tree
@ 2012-05-16  9:30 Stephen Rothwell
  2012-05-16 16:43 ` Oleg Nesterov
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2012-05-16  9:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-next, linux-kernel, Oleg Nesterov, Eric W. Biederman

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in kernel/exit.c
between commit a29c33f4e506 ("userns: Convert setting and getting uid and
gid system calls to use kuid and kgid") from the uerns tree and commit
"cred: remove task_is_dead() from __task_cred() validation" from the akpm
tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc kernel/exit.c
index 112f703,7c293e6..0000000
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@@ -1218,7 -1218,7 +1218,7 @@@ static int wait_task_zombie(struct wait
  	unsigned long state;
  	int retval, status, traced;
  	pid_t pid = task_pid_vnr(p);
- 	uid_t uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid);
 -	uid_t uid = task_uid(p);
++	uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
  	struct siginfo __user *infop;
  
  	if (!likely(wo->wo_flags & WEXITED))

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the akpm with the  tree
  2012-05-16  9:30 linux-next: manual merge of the akpm with the tree Stephen Rothwell
@ 2012-05-16 16:43 ` Oleg Nesterov
  2012-05-17 17:28   ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2012-05-16 16:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, linux-next, linux-kernel, Eric W. Biederman

On 05/16, Stephen Rothwell wrote:
>
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@@ -1218,7 -1218,7 +1218,7 @@@ static int wait_task_zombie(struct wait
>   	unsigned long state;
>   	int retval, status, traced;
>   	pid_t pid = task_pid_vnr(p);
> - 	uid_t uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid);
>  -	uid_t uid = task_uid(p);
> ++	uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
>   	struct siginfo __user *infop;

Thanks Stephen, the fix looks correct.

Oleg.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the akpm with the  tree
  2012-05-16 16:43 ` Oleg Nesterov
@ 2012-05-17 17:28   ` Eric W. Biederman
  0 siblings, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2012-05-17 17:28 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Stephen Rothwell, Andrew Morton, linux-next, linux-kernel

Oleg Nesterov <oleg@redhat.com> writes:

> On 05/16, Stephen Rothwell wrote:
>>
>> --- a/kernel/exit.c
>> +++ b/kernel/exit.c
>> @@@ -1218,7 -1218,7 +1218,7 @@@ static int wait_task_zombie(struct wait
>>   	unsigned long state;
>>   	int retval, status, traced;
>>   	pid_t pid = task_pid_vnr(p);
>> - 	uid_t uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid);
>>  -	uid_t uid = task_uid(p);
>> ++	uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
>>   	struct siginfo __user *infop;
>
> Thanks Stephen, the fix looks correct.
>
> Oleg.

Yes.  That looks good.

I'm not quite certain of my thinking there was.  The two idioms are
equivalent.  I suspect I confused task_uid(p) which is fine with
task_user_ns(p) which is only safe under the rtnl lock and should
probably be removed as a helper function because it isn't used that way.

Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-17 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16  9:30 linux-next: manual merge of the akpm with the tree Stephen Rothwell
2012-05-16 16:43 ` Oleg Nesterov
2012-05-17 17:28   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).