* [patch 0/1] Do not unregister_cpu_notifier in case of wrong state
@ 2011-03-29 12:48 Heinz Graalfs
2011-03-29 12:48 ` [patch 1/1] " Heinz Graalfs
0 siblings, 1 reply; 2+ messages in thread
From: Heinz Graalfs @ 2011-03-29 12:48 UTC (permalink / raw)
To: robert.richter
Cc: mingo, oprofile-list, linux-kernel, linux-s390, borntraeger,
schwidefsky, heiko.carstens
From: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
This patch avoids calling unregister_cpu_notifier() in case
hwsampler_shutdown() is invoked in wrong state.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch 1/1] Do not unregister_cpu_notifier in case of wrong state
2011-03-29 12:48 [patch 0/1] Do not unregister_cpu_notifier in case of wrong state Heinz Graalfs
@ 2011-03-29 12:48 ` Heinz Graalfs
0 siblings, 0 replies; 2+ messages in thread
From: Heinz Graalfs @ 2011-03-29 12:48 UTC (permalink / raw)
To: robert.richter
Cc: mingo, oprofile-list, linux-kernel, linux-s390, borntraeger,
schwidefsky, heiko.carstens
[-- Attachment #1: hwsampler-shutdown.patch --]
[-- Type: text/plain, Size: 823 bytes --]
From: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
This patch avoids calling unregister_cpu_notifier() in case
hwsampler_shutdown() is invoked in wrong state.
---
arch/s390/oprofile/hwsampler.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
Index: 2.6.39/arch/s390/oprofile/hwsampler.c
===================================================================
--- 2.6.39.orig/arch/s390/oprofile/hwsampler.c
+++ 2.6.39/arch/s390/oprofile/hwsampler.c
@@ -1143,11 +1143,14 @@ int hwsampler_shutdown()
unregister_external_interrupt(0x1407, hws_ext_handler);
hws_state = HWS_INIT;
+
+ mutex_unlock(&hws_sem);
+ unregister_cpu_notifier(&hws_cpu_notifier);
+
rc = 0;
+ } else {
+ mutex_unlock(&hws_sem);
}
- mutex_unlock(&hws_sem);
-
- unregister_cpu_notifier(&hws_cpu_notifier);
return rc;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-29 12:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 12:48 [patch 0/1] Do not unregister_cpu_notifier in case of wrong state Heinz Graalfs
2011-03-29 12:48 ` [patch 1/1] " Heinz Graalfs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox