提交 4b7a89a3 编写于 作者: A Arjan van de Ven 提交者: Dominik Brodowski

[PATCH] pcmcia: fix deadlock in pcmcia_parse_events

The PCMCIA layer calls pcmcia_parse_events both from user context and
IRQ context; the lock thus needs to be irqsave to avoid deadlocks
Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 6bb1c39a
......@@ -699,11 +699,12 @@ static int pccardd(void *__skt)
*/
void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
{
unsigned long flags;
cs_dbg(s, 4, "parse_events: events %08x\n", events);
if (s->thread) {
spin_lock(&s->thread_lock);
spin_lock_irqsave(&s->thread_lock, flags);
s->thread_events |= events;
spin_unlock(&s->thread_lock);
spin_unlock_irqrestore(&s->thread_lock, flags);
wake_up(&s->thread_wait);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册