mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
37ef9bd48a
commit
9b218f63e5
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,6 @@ static int eeh_event_handler(void * dummy)
|
||||||
struct eeh_dev *edev;
|
struct eeh_dev *edev;
|
||||||
|
|
||||||
set_task_comm(current, "eehd");
|
set_task_comm(current, "eehd");
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
|
||||||
|
|
||||||
spin_lock_irqsave(&eeh_eventlist_lock, flags);
|
spin_lock_irqsave(&eeh_eventlist_lock, flags);
|
||||||
event = NULL;
|
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",
|
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
|
||||||
eeh_pci_name(edev->pdev));
|
eeh_pci_name(edev->pdev));
|
||||||
|
|
||||||
|
set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
|
||||||
edev = handle_eeh_events(event);
|
edev = handle_eeh_events(event);
|
||||||
|
|
||||||
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
|
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
|
||||||
|
|
Loading…
Reference in a new issue