diff options
| author | Andrew Morton <akpm@osdl.org> | 2003-07-10 10:04:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-10 10:04:32 -0700 |
| commit | e59d9afb3656cd89b6831463958d5ba88fdeb052 (patch) | |
| tree | d956d0b23988d39ef03c7ca10fd04b0901214343 | |
| parent | 85cea662ff84bec177e139b8d3b21e9c1e479650 (diff) | |
[PATCH] Fix yenta-socket oops
From: Russell King <rmk@arm.linux.org.uk>
Interrupts can sometimes occur before the socket thread is started.
| -rw-r--r-- | drivers/pcmcia/cs.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 1d3853bb3dd2..91078d5fff0c 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -868,13 +868,19 @@ static int pccardd(void *__skt) complete_and_exit(&skt->thread_done, 0); } +/* + * Yenta (at least) probes interrupts before registering the socket and + * starting the handler thread. + */ void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) { - spin_lock(&s->thread_lock); - s->thread_events |= events; - spin_unlock(&s->thread_lock); + if (s->thread) { + spin_lock(&s->thread_lock); + s->thread_events |= events; + spin_unlock(&s->thread_lock); - wake_up(&s->thread_wait); + wake_up(&s->thread_wait); + } } /* pcmcia_parse_events */ |
