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

From: Stephen Rothwell
Date: Mon Nov 26 2012 - 08:13:13 EST


Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in kernel/fork.c
between commit b2e0d98705e6 ("userns: Implement unshare of the user
namespace") from the userns tree and commit ("fork: unshare: remove dead
cod") from the akpm tree.

I fixed it up (I think - see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc kernel/fork.c
index 7e0dc2f,58088f9..0000000
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -1867,20 -1858,8 +1865,17 @@@ SYSCALL_DEFINE1(unshare, unsigned long
}

task_unlock(current);
+
+ if (new_cred) {
+ /* Install the new user namespace */
+ commit_creds(new_cred);
+ new_cred = NULL;
+ }
}

- if (new_nsproxy)
- put_nsproxy(new_nsproxy);
-
+bad_unshare_cleanup_cred:
+ if (new_cred)
+ put_cred(new_cred);
bad_unshare_cleanup_fd:
if (new_fd)
put_files_struct(new_fd);

Attachment: pgp00000.pgp
Description: PGP signature