Commit fcc534f1 authored by Russell King's avatar Russell King

[PCMCIA] Prevent PCMCIA oops during socket driver initialisation.

We were calling wake_up on an uninitialised wait queue.  Oops.
Fix this by ignoring events from the socket driver if we know that
the pcmcia thread is not running.
parent 1d7be70b
......@@ -870,11 +870,13 @@ static int pccardd(void *__skt)
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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment