diff --git a/debian/changelog b/debian/changelog index 284c1685b..247091350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-2.6 (3.2.9-2) UNRELEASED; urgency=low + + * [rt] fix locking when taking down a CPU + + -- Uwe Kleine-König Tue, 06 Mar 2012 09:26:00 +0100 + linux-2.6 (3.2.9-1) unstable; urgency=high * New upstream stable update: diff --git a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch index 4fcc2b606..e2c440507 100644 --- a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch +++ b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch @@ -18,8 +18,11 @@ Cc: Clark Williams Cc: stable-rt@vger.kernel.org Link: http://lkml.kernel.org/r/1330702617.25686.265.camel@gandalf.stny.rr.com Signed-off-by: Thomas Gleixner +--- +[ukleinek: squash in an obvious fix by Steven Rostedt + id:1330985640.25686.342.camel@gandalf.stny.rr.com] diff --git a/kernel/cpu.c b/kernel/cpu.c -index fa40834..c25b5ff 100644 +index fa40834..66dfb74 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -46,7 +46,12 @@ static int cpu_hotplug_disabled; @@ -35,16 +38,24 @@ index fa40834..c25b5ff 100644 /* * Also blocks the new readers during * an ongoing cpu hotplug operation. -@@ -58,6 +63,14 @@ static struct { +@@ -54,10 +59,22 @@ static struct { + int refcount; + } cpu_hotplug = { + .active_writer = NULL, ++#ifdef CONFIG_PREEMPT_RT_FULL ++ .lock = __SPIN_LOCK_UNLOCKED(cpu_hotplug.lock), ++#else + .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock), ++#endif .refcount = 0, }; +#ifdef CONFIG_PREEMPT_RT_FULL -+# define hotplug_lock() spin_lock(&cpu_hotplug.lock) -+# define hotplug_unlock() spin_unlock(&cpu_hotplug.lock) ++# define hotplug_lock() rt_spin_lock(&cpu_hotplug.lock) ++# define hotplug_unlock() rt_spin_unlock(&cpu_hotplug.lock) +#else +# define hotplug_lock() mutex_lock(&cpu_hotplug.lock) -+# define hotplug_lock() mutex_unlock(&cpu_hotplug.lock) ++# define hotplug_unlock() mutex_unlock(&cpu_hotplug.lock) +#endif + struct hotplug_pcp {