git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revert "crc32: use __BYTE_ORDER macro for endian detection"
[safe/jmp/linux-2.6]
/
kernel
/
cred.c
diff --git
a/kernel/cred.c
b/kernel/cred.c
index
19d3ccc
..
2c24870
100644
(file)
--- a/
kernel/cred.c
+++ b/
kernel/cred.c
@@
-10,6
+10,7
@@
*/
#include <linux/module.h>
#include <linux/cred.h>
*/
#include <linux/module.h>
#include <linux/cred.h>
+#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/key.h>
#include <linux/keyctl.h>
#include <linux/sched.h>
#include <linux/key.h>
#include <linux/keyctl.h>
@@
-396,6
+397,8
@@
struct cred *prepare_usermodehelper_creds(void)
error:
put_cred(new);
error:
put_cred(new);
+ return NULL;
+
free_tgcred:
#ifdef CONFIG_KEYS
kfree(tgcred);
free_tgcred:
#ifdef CONFIG_KEYS
kfree(tgcred);
@@
-519,8
+522,6
@@
int commit_creds(struct cred *new)
#endif
BUG_ON(atomic_read(&new->usage) < 1);
#endif
BUG_ON(atomic_read(&new->usage) < 1);
- security_commit_creds(new, old);
-
get_cred(new); /* we will require a ref for the subj creds too */
/* dumpability changes */
get_cred(new); /* we will require a ref for the subj creds too */
/* dumpability changes */
@@
-787,8
+788,6
@@
bool creds_are_invalid(const struct cred *cred)
{
if (cred->magic != CRED_MAGIC)
return true;
{
if (cred->magic != CRED_MAGIC)
return true;
- if (atomic_read(&cred->usage) < atomic_read(&cred->subscribers))
- return true;
#ifdef CONFIG_SECURITY_SELINUX
if (selinux_is_enabled()) {
if ((unsigned long) cred->security < PAGE_SIZE)
#ifdef CONFIG_SECURITY_SELINUX
if (selinux_is_enabled()) {
if ((unsigned long) cred->security < PAGE_SIZE)