lkml.org 
[lkml]   [2013]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: user_namespace: always set the return parameter 'new_cred' when call unshare_userns() successfully.
On 08/20, Serge Hallyn wrote:
>
> Quoting Chen Gang (gang.chen@asianux.com):
> > When unshare_userns() succeed, recommend to always set the return
> > parameter which may be used by caller.
> >
> > The caller has rights to call it with 'new_cred' uninitialized, if
> > succeed, the caller can assume the 'new_cred' has been initialized.
>
> But the only existing caller (sys_unshare) does in fact initialize it to
> NULL. So while this patch does no harm, is it necessary?

Agreed.

Plus, with this patch unshare_userns() becomes "inconsistent" compared
to other unshare_ helpers.

Oleg.



\
 
 \ /
  Last update: 2013-08-20 17:01    [W:0.084 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site