diff options
| author | Dima Zavin <dima@android.com> | 2011-02-08 11:09:45 -0800 |
|---|---|---|
| committer | Dima Zavin <dima@android.com> | 2011-02-08 11:09:45 -0800 |
| commit | 0f97de8bc5c0ea8ed06a29e52becb36ed9f18463 (patch) | |
| tree | 739949b312d413f7b4007cb8e41d20d175d5fc9b /security | |
| parent | 82d823eb81ffde63fb38afcbad82801a77c2573b (diff) | |
| parent | 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff) | |
Merge commit 'v2.6.38-rc4' into android-2.6.38
Diffstat (limited to 'security')
| -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); } |
