diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2006-06-30 10:31:13 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-06-30 22:09:13 +0200 |
commit | 4b7a89a3c1cf545b03470416aa821fc2ff826b91 (patch) | |
tree | ba2d19e733eeb891dafd91b1dbe39e9bbf26f16e /drivers/pcmcia | |
parent | 6bb1c39a43d23e4cecc7e815491b6964c6758a29 (diff) | |
download | linux-4b7a89a3c1cf545b03470416aa821fc2ff826b91.tar.bz2 |
[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: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 06e2cda4e07b..f9cd831a3f31 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -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); } |