From: Fabian Frederick Date: Fri, 20 Feb 2015 18:12:52 +0000 (+0100) Subject: mISDN: replace current->state by set_current_state() X-Git-Tag: MMI-PSA29.97-13-9~10520^2~62 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45cee4f594bcb3083c2d8475462af2f2ddf29aff;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mISDN: replace current->state by set_current_state() Use helper function to access current->state. Direct assignments are prone to races and therefore buggy. Thanks to Peter Zijlstra for the exact definition of the problem. Signed-off-by: Fabian Frederick Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 3c92780bda09..ff48da61c94c 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -1755,7 +1755,7 @@ init_card(struct hfc_pci *hc) enable_hwirq(hc); spin_unlock_irqrestore(&hc->lock, flags); /* Timeout 80ms */ - current->state = TASK_UNINTERRUPTIBLE; + set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout((80 * HZ) / 1000); printk(KERN_INFO "HFC PCI: IRQ %d count %d\n", hc->irq, hc->irqcnt);