lkml.org 
[lkml]   [2011]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 1/1] Do not unregister_cpu_notifier in case of wrong state
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;
}


\
 
 \ /
  Last update: 2011-03-29 14:57    [W:0.429 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site