mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: <ffrederick@prov-liege.be>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]2.6 test1 mm2 user.c race (?)
Date: Mon, 28 Jul 2003 12:14:20 -0700	[thread overview]
Message-ID: <20030728121420.255ce643.akpm@osdl.org> (raw)
In-Reply-To: <200307281204.h6SC4soV001044@fire-1.osdl.org>

<ffrederick@prov-liege.be> wrote:
>
> +	spin_lock(&uidhash_lock);
>  	uid_hash_insert(&root_user, uidhashentry(0));
> +	spin_unlock(&uidhash_lock);	

This code runs within an initcall, so it is very unlikely that anything
will race with us here.

But SMP is up, and this code gets dropped out of memory later (the
out-of-line spinlock code doesn't get dropped though).

So yes, I'd prefer that the locking be there, if only for documentary
purposes.  A /* comment */ which explains why the locking was omitted would
also be suitabe.


       reply	other threads:[~2003-07-28 19:26 UTC|newest]

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

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=20030728121420.255ce643.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ffrederick@prov-liege.be \
    --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®