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 <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Fabian Frederick 2015-02-20 19:12:52 +01:00 committed by David S. Miller
parent 3f34b24a73
commit 45cee4f594
1 changed files with 1 additions and 1 deletions

View File

@ -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);