提交 9b218f63 编写于 作者: A Andrew Morton 提交者: Benjamin Herrenschmidt

powerpc/eeh: Fix use of set_current_state() in eeh event handling set_current_state() wart

That set_current_state() won't work very well: the subsequent mutex_lock()
might flip the task back into TASK_RUNNING.

Attempt to put it somewhere where it might have been meant to be, and
attempt to describe why it might have been added.
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 37ef9bd4
......@@ -60,7 +60,6 @@ static int eeh_event_handler(void * dummy)
struct eeh_dev *edev;
set_task_comm(current, "eehd");
set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
event = NULL;
......@@ -83,6 +82,7 @@ static int eeh_event_handler(void * dummy)
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
eeh_pci_name(edev->pdev));
set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
edev = handle_eeh_events(event);
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册