Welcome! Log In Create A New Profile

Advanced

linux-next: manual merge of the akpm with the tree

Posted by Stephen Rothwell 
Stephen Rothwell
linux-next: manual merge of the akpm with the tree
May 16, 2012 11:40AM
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))
Oleg Nesterov
Re: linux-next: manual merge of the akpm with the tree
May 16, 2012 06:50PM
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Anonymous User
Re: linux-next: manual merge of the akpm with the tree
May 17, 2012 07:30PM
Oleg Nesterov <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Sorry, only registered users may post in this forum.

Click here to login