- x86_64-fix-die_lock-nesting.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     x86_64: fix die_lock nesting

has been removed from the -mm tree.  Its filename is

     x86_64-fix-die_lock-nesting.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


From: Corey Minyard <minyard@xxxxxxx>

I noticed this when poking around in this area.

The oops_begin() function in x86_64 would only conditionally claim the
die_lock if the call is nested, but oops_end() would always release the
spinlock.  This patch adds a nest count for the die lock so that the release
of the lock is only done on the final oops_end().

Signed-off-by: Corey Minyard <minyard@xxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/x86_64/kernel/traps.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)

diff -puN arch/x86_64/kernel/traps.c~x86_64-fix-die_lock-nesting arch/x86_64/kernel/traps.c
--- devel/arch/x86_64/kernel/traps.c~x86_64-fix-die_lock-nesting	2006-05-10 21:18:08.000000000 -0700
+++ devel-akpm/arch/x86_64/kernel/traps.c	2006-05-10 21:18:08.000000000 -0700
@@ -385,6 +385,7 @@ void out_of_line_bug(void)
 
 static DEFINE_SPINLOCK(die_lock);
 static int die_owner = -1;
+static unsigned int die_nest_count;
 
 unsigned __kprobes long oops_begin(void)
 {
@@ -399,6 +400,7 @@ unsigned __kprobes long oops_begin(void)
 		else
 			spin_lock(&die_lock);
 	}
+	die_nest_count++;
 	die_owner = cpu;
 	console_verbose();
 	bust_spinlocks(1);
@@ -409,7 +411,13 @@ void __kprobes oops_end(unsigned long fl
 { 
 	die_owner = -1;
 	bust_spinlocks(0);
-	spin_unlock_irqrestore(&die_lock, flags);
+	die_nest_count--;
+	if (die_nest_count)
+		/* We still own the lock */
+		local_irq_restore(flags);
+	else
+		/* Nest count reaches zero, release the lock. */
+		spin_unlock_irqrestore(&die_lock, flags);
 	if (panic_on_oops)
 		panic("Oops");
 }
_

Patches currently in -mm which might be from minyard@xxxxxxx are

origin.patch
strstrip-api.patch
ipmi-strstrip-conversion.patch
drivers-char-ipmi-ipmi_msghandlerc-make-proc_ipmi_root-static.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux