Commit 196c87ec authored by Peter Chubb's avatar Peter Chubb Committed by Linus Torvalds

[PATCH] fix crash in yenta_bh() on card insertion/removal

In the current kernels, when a PCMCIA card is inserted into or
removed from a socket, the kernel oopses because yenta_bh() tries to
dereference a NULL pointer.

The attached patch initialises the argument to yenta_bh() so that this
doesn't happen.
parent 57e06b22
...@@ -583,7 +583,7 @@ static void yenta_open_bh(void * data) ...@@ -583,7 +583,7 @@ static void yenta_open_bh(void * data)
pci_socket_t * socket = (pci_socket_t *) data; pci_socket_t * socket = (pci_socket_t *) data;
/* It's OK to overwrite this now */ /* It's OK to overwrite this now */
INIT_WORK(&socket->tq_task, yenta_bh, NULL); INIT_WORK(&socket->tq_task, yenta_bh, socket);
if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, socket->dev->name, socket)) { if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, socket->dev->name, socket)) {
/* No IRQ or request_irq failed. Poll */ /* No IRQ or request_irq failed. Poll */
......
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