Messages in this thread | | | Date | Sat, 2 Aug 2003 12:00:23 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] [1/2] random: SMP locking |
| |
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.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |