From: Serge E. Hallyn Date: Thu, 26 May 2011 20:25:05 +0000 (-0500) Subject: Set cred->user_ns in key_replace_session_keyring X-Git-Tag: v3.0-rc1~126 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7285b5d631fd6096b11c6af0058ed3a2b30ef4e;p=pandora-kernel.git Set cred->user_ns in key_replace_session_keyring Since this cred was not created with copy_creds(), it needs to get initialized. Otherwise use of syscall(__NR_keyctl, KEYCTL_SESSION_TO_PARENT); can lead to a NULL deref. Thanks to Robert for finding this. But introduced by commit 47a150edc2a ("Cache user_ns in struct cred"). Signed-off-by: Serge E. Hallyn Reported-by: Robert Święcki Cc: David Howells Cc: stable@kernel.org (2.6.39) Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed