mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <ffrederick@prov-liege.be>
To: <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH]2.6 test1 mm2 user.c race (?)
Date: Mon, 28 Jul 2003 14:31:23 CEST	[thread overview]
Message-ID: <S263861AbTG1Ltd/20030728114933Z+399@vger.kernel.org> (raw)

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;
 }
 


___________________________________




             reply	other threads:[~2003-07-28 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-28 12:31 ffrederick [this message]
     [not found] <200307281204.h6SC4soV001044@fire-1.osdl.org>
2003-07-28 19:14 ` Andrew Morton
2003-07-30  2:53   ` Bill Davidsen

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=S263861AbTG1Ltd/20030728114933Z+399@vger.kernel.org \
    --to=ffrederick@prov-liege.be \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®