mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]2.6 test1 mm2 user.c race (?)
@ 2003-07-28 12:31 ffrederick
  0 siblings, 0 replies; 3+ messages in thread
From: ffrederick @ 2003-07-28 12:31 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Andrew,

        Trivial patch against possible smp race (?) in user.c
or do we have bkl above ?

Regards,
Fabian

diff -Naur orig/kernel/user.c edited/kernel/user.c
--- orig/kernel/user.c	2003-07-14 05:32:42.000000000 +0200
+++ edited/kernel/user.c	2003-07-28 13:44:55.000000000 +0200
@@ -146,8 +146,11 @@
 	for(n = 0; n < UIDHASH_SZ; ++n)
 		INIT_LIST_HEAD(uidhash_table + n);
 
-	/* Insert the root user immediately - init already runs with this */
+	/* Insert the root user immediately (init already runs as root) */
+	spin_lock(&uidhash_lock);
 	uid_hash_insert(&root_user, uidhashentry(0));
+	spin_unlock(&uidhash_lock);	
+
 	return 0;
 }
 


___________________________________




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-30  3:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200307281204.h6SC4soV001044@fire-1.osdl.org>
2003-07-28 19:14 ` [PATCH]2.6 test1 mm2 user.c race (?) Andrew Morton
2003-07-30  2:53   ` Bill Davidsen
2003-07-28 12:31 ffrederick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®