From: Andrew Morton <akpm@osdl.org>
To: Matt Mackall <mpm@selenic.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [1/2] random: SMP locking
Date: Sat, 2 Aug 2003 12:00:23 -0700 [thread overview]
Message-ID: <20030802120023.7390f68f.akpm@osdl.org> (raw)
In-Reply-To: <20030802143222.GG22824@waste.org>
Matt Mackall <mpm@selenic.com> wrote:
>
> > Are you really sure that all the decisions about where to use spin_lock()
> > vs spin_lock_irq() vs spin_lock_irqsave() are correct? They are
> > non-obvious.
>
> Aside from the put_user stuff below, yes.
Well I see in Linus's current tree:
ndev->regen_timer.function = ipv6_regen_rndid;
And ipv6_regen_rndid() ends up calling get_random_bytes() which calls
extract_entropy() which now does a bare spin_lock().
So I think if the timer is run while some process-context code on the same
CPU is running get_random_bytes() we deadlock don't we?
Probably, we should make get_random_bytes() callable from any context.
next prev parent reply other threads:[~2003-08-02 18:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-02 4:24 Oliver Xymoron
2003-08-02 11:00 ` Andrew Morton
2003-08-02 12:35 ` Zwane Mwaikambo
2003-08-02 14:43 ` Matt Mackall
2003-08-02 15:02 ` Zwane Mwaikambo
2003-08-02 18:39 ` Andrew Morton
2003-08-02 18:42 ` Matt Mackall
2003-08-02 14:32 ` Matt Mackall
2003-08-02 19:00 ` Andrew Morton [this message]
2003-08-02 19:33 ` Matt Mackall
2003-08-02 19:46 ` Andrew Morton
2003-08-02 20:14 ` Matt Mackall
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=20030802120023.7390f68f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
/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®