Skip to content

Commit

Permalink
powerpc/eeh: Fix use of set_current_state() in eeh event handling set…
Browse files Browse the repository at this point in the history
…_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 <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
akpm00 authored and ozbenh committed Apr 2, 2012
1 parent 37ef9bd commit 9b218f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/eeh_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 9b218f6

Please sign in to comment.