aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/myricom
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-08-06 19:38:55 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-08-06 13:13:24 -0700
commit6160968cee8b90a5dd95318d716e31d7775c4ef3 (patch)
tree3183e99bd38da761532685c045c2eac29c80b0b9 /firmware/myricom
parentLinux 3.11-rc4 (diff)
downloadlinux-dev-6160968cee8b90a5dd95318d716e31d7775c4ef3.tar.xz
linux-dev-6160968cee8b90a5dd95318d716e31d7775c4ef3.zip
userns: unshare_userns(&cred) should not populate cred on failure
unshare_userns(new_cred) does *new_cred = prepare_creds() before create_user_ns() which can fail. However, the caller expects that it doesn't need to take care of new_cred if unshare_userns() fails. We could change the single caller, sys_unshare(), but I think it would be more clean to avoid the side effects on failure, so with this patch unshare_userns() does put_cred() itself and initializes *new_cred only if create_user_ns() succeeeds. Cc: stable@vger.kernel.org Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'firmware/myricom')
0 files changed, 0 insertions, 0 deletions