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: v4.14-rc1~5831^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=45cee4f594bcb3083c2d8475462af2f2ddf29aff;p=platform%2Fkernel%2Flinux-rpi.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 3c92780..ff48da6 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);