From: Prasanna Meda <mlp@google.com>
To: akpm@osdl.org
Cc: linux-mm@kvack.org
Subject: [PATCH] alloc uid cleanup
Date: Tue, 18 Apr 2006 00:50:42 +0530 [thread overview]
Message-ID: <E1FVZH8-0004f1-8s@blr-eng3.blr.corp.google.com> (raw)
Cleanup: Release the lock before key_put methods. They call
schedule_work etc. They block interrupts now, so it is not bug fix.
Signed-off-by: Prasanna Meda
--- a/kernel/user.c 2006-04-17 23:02:54.000000000 +0530
+++ b/kernel/user.c 2006-04-17 23:06:01.000000000 +0530
@@ -160,15 +160,15 @@ struct user_struct * alloc_uid(uid_t uid
spin_lock_irq(&uidhash_lock);
up = uid_hash_find(uid, hashent);
if (up) {
+ spin_unlock_irq(&uidhash_lock);
key_put(new->uid_keyring);
key_put(new->session_keyring);
kmem_cache_free(uid_cachep, new);
} else {
uid_hash_insert(new, hashent);
up = new;
+ spin_unlock_irq (&uidhash_lock);
}
- spin_unlock_irq(&uidhash_lock);
-
}
return up;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2006-04-17 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-17 19:20 Prasanna Meda [this message]
2006-04-18 4:53 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1FVZH8-0004f1-8s@blr-eng3.blr.corp.google.com \
--to=mlp@google.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox