diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-02-16 13:33:35 +0100 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-02-16 13:33:41 +0100 | 
| commit | a3ec4a603faf4244e275bf11b467aad092dfbd8a (patch) | |
| tree | 1c15009716b37629070ea221a00eb9fe2303a317 /security/selinux/hooks.c | |
| parent | 51563cd53c4b1c1790fccd2e0af0e2b756589af9 (diff) | |
| parent | 85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff) | |
| download | olio-linux-3.10-a3ec4a603faf4244e275bf11b467aad092dfbd8a.tar.xz olio-linux-3.10-a3ec4a603faf4244e275bf11b467aad092dfbd8a.zip  | |
Merge commit 'v2.6.38-rc5' into core/locking
Merge reason: pick up upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index e276eb46853..c8d69927068 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3198,7 +3198,11 @@ static void selinux_cred_free(struct cred *cred)  {  	struct task_security_struct *tsec = cred->security; -	BUG_ON((unsigned long) cred->security < PAGE_SIZE); +	/* +	 * cred->security == NULL if security_cred_alloc_blank() or +	 * security_prepare_creds() returned an error. +	 */ +	BUG_ON(cred->security && (unsigned long) cred->security < PAGE_SIZE);  	cred->security = (void *) 0x7UL;  	kfree(tsec);  }  |