* [PATCH] pci_get_device call from interrupt in reboot fixups (description fixed)
@ 2007-08-07 9:13 Denis V. Lunev
0 siblings, 0 replies; only message in thread
From: Denis V. Lunev @ 2007-08-07 9:13 UTC (permalink / raw)
To: den, dev, akpm, gregkh; +Cc: devel, linux-kernel, xemul
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 <den@openvz.org>
---
reboot_fixups.c | 6 ++++++
1 file changed, 6 insertions(+)
--- ./arch/i386/kernel/reboot_fixups.c.fixup2 2007-08-07 12:30:30.000000000 +0400
+++ ./arch/i386/kernel/reboot_fixups.c 2007-08-07 12:31:22.000000000 +0400
@@ -11,6 +11,7 @@
#include <asm/delay.h>
#include <linux/pci.h>
#include <linux/reboot_fixups.h>
+#include <linux/interrupt.h>
static void cs5530a_warm_reset(struct pci_dev *dev)
{
@@ -43,6 +44,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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-07 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-07 9:13 [PATCH] pci_get_device call from interrupt in reboot fixups (description fixed) Denis V. Lunev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).