git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
kernel
/
user.c
diff --git
a/kernel/user.c
b/kernel/user.c
index
bcbd0b3
..
155084e
100644
(file)
--- a/
kernel/user.c
+++ b/
kernel/user.c
@@
-105,19
+105,15
@@
void free_uid(struct user_struct *up)
{
unsigned long flags;
{
unsigned long flags;
- if (!up)
- return;
-
local_irq_save(flags);
local_irq_save(flags);
- if (atomic_dec_and_lock(&up->__count, &uidhash_lock)) {
+ if (
up &&
atomic_dec_and_lock(&up->__count, &uidhash_lock)) {
uid_hash_remove(up);
uid_hash_remove(up);
- spin_unlock_irqrestore(&uidhash_lock, flags);
key_put(up->uid_keyring);
key_put(up->session_keyring);
kmem_cache_free(uid_cachep, up);
key_put(up->uid_keyring);
key_put(up->session_keyring);
kmem_cache_free(uid_cachep, up);
- } else {
- local_irq_restore(flags);
+ spin_unlock(&uidhash_lock);
}
}
+ local_irq_restore(flags);
}
struct user_struct * alloc_uid(xid_t xid, uid_t uid)
}
struct user_struct * alloc_uid(xid_t xid, uid_t uid)