aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2012-03-28 08:20:58 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-04-02 00:31:19 -0400
commit9b218f63e50e590fe0c7724a0838d7eaa6dae5ce (patch)
tree2879a705de175bc7e956d90d72dee2bf1c38499c
parent37ef9bd48af6ab9a3d1fd28df4f929abc19f2cc3 (diff)
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>
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 92dd84c124f1..4cb375c0f8d1 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -60,7 +60,6 @@ static int eeh_event_handler(void * dummy)
60 struct eeh_dev *edev; 60 struct eeh_dev *edev;
61 61
62 set_task_comm(current, "eehd"); 62 set_task_comm(current, "eehd");
63 set_current_state(TASK_INTERRUPTIBLE);
64 63
65 spin_lock_irqsave(&eeh_eventlist_lock, flags); 64 spin_lock_irqsave(&eeh_eventlist_lock, flags);
66 event = NULL; 65 event = NULL;
@@ -83,6 +82,7 @@ static int eeh_event_handler(void * dummy)
83 printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", 82 printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
84 eeh_pci_name(edev->pdev)); 83 eeh_pci_name(edev->pdev));
85 84
85 set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
86 edev = handle_eeh_events(event); 86 edev = handle_eeh_events(event);
87 87
88 eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING); 88 eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);