Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45cee4f5 authored by Fabian Frederick's avatar Fabian Frederick Committed by David S. Miller
Browse files

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: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f34b24a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1755,7 +1755,7 @@ init_card(struct hfc_pci *hc)
		enable_hwirq(hc);
		enable_hwirq(hc);
		spin_unlock_irqrestore(&hc->lock, flags);
		spin_unlock_irqrestore(&hc->lock, flags);
		/* Timeout 80ms */
		/* Timeout 80ms */
		current->state = TASK_UNINTERRUPTIBLE;
		set_current_state(TASK_UNINTERRUPTIBLE);
		schedule_timeout((80 * HZ) / 1000);
		schedule_timeout((80 * HZ) / 1000);
		printk(KERN_INFO "HFC PCI: IRQ %d count %d\n",
		printk(KERN_INFO "HFC PCI: IRQ %d count %d\n",
		       hc->irq, hc->irqcnt);
		       hc->irq, hc->irqcnt);