提交 15920d8a 编写于 作者: C Colin Ian King 提交者: John W. Linville

wireless: hostap, fix oops due to early probing interrupt

BugLink: https://bugs.launchpad.net/ubuntu/+bug/254837

Spurious shared interrupts or early probing interrupts can cause the
hostap interrupt handler to oops before the driver has fully configured
the IO base port addresses. In some cases the oops can be because
the hardware shares an interrupt line, on other cases it is due to a
race condition between probing for the hardware and configuring
the IO base port. The latter occurs because the probing is required to
determin the hardware port address which is only determined when the probe
can interrupt the hardware (catch 22).

This patch catches this pre-configured condition to avoid the oops.
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
Acked-by: NTim Gardner <tim.gardner@canonical.com>
Acked-by: NStefan Bader <stefan.bader@canonical.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 254416aa
......@@ -2618,6 +2618,15 @@ static irqreturn_t prism2_interrupt(int irq, void *dev_id)
int events = 0;
u16 ev;
/* Detect early interrupt before driver is fully configued */
if (!dev->base_addr) {
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: Interrupt, but dev not configured\n",
dev->name);
}
return IRQ_HANDLED;
}
iface = netdev_priv(dev);
local = iface->local;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册