Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d034aecd8b70d34388a4e40ca50af0d014223e1
Commit:     3d034aecd8b70d34388a4e40ca50af0d014223e1
Parent:     aa24886e379d2b641c5117e178b15ce1d5d366ba
Author:     Denis V. Lunev <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 7 13:13:18 2007 +0400
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 15:03:15 2007 -0700

    PCI: pci_get_device call from interrupt in reboot fixups
    
    The following calltrace is possible now:
     handle_sysrq
       machine_emergency_restart
         mach_reboot_fixups
           pci_get_device
             pci_get_subsys
           down_read
    The patch skips reboot fixup if called from sysrq-B code.
    
    Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 arch/x86/kernel/reboot_fixups_32.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/reboot_fixups_32.c 
b/arch/x86/kernel/reboot_fixups_32.c
index 03e1cce..139eb03 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -11,6 +11,7 @@
 
 #include <asm/delay.h>
 #include <linux/pci.h>
+#include <linux/interrupt.h>
 #include <asm/reboot_fixups.h>
 #include <asm/msr.h>
 
@@ -56,6 +57,11 @@ void mach_reboot_fixups(void)
        struct pci_dev *dev;
        int i;
 
+       /* we can be called from sysrq-B code. In such a case it is
+        * prohibited to dig PCI */
+       if (in_interrupt())
+               return;
+
        for (i=0; i < ARRAY_SIZE(fixups_table); i++) {
                cur = &(fixups_table[i]);
                dev = pci_get_device(cur->vendor, cur->device, NULL);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to