LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Hisax driver oopses when CONFIG_DEBUG_SHIRQ is enabled
@ 2008-02-29 23:37 Chuck Ebbert
  2008-03-01 16:26 ` [PATCH] hisax_fcpcipnp: move request_irq later in probe Kyle McMartin
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2008-02-29 23:37 UTC (permalink / raw)
  To: Karsten Keil; +Cc: linux-kernel

>From https://bugzilla.redhat.com/show_bug.cgi?id=362621

The driver enables interrupts before it is ready to receive them.

In drivers/isdn/hisax/hisax_fcpcipnp.c, adapter->read_hdlc etc. are
not initialized and the driver attempts to call these functions.

Nov 18 14:54:02 studienpraefekt kernel: hisax_fcpcipnp: found adapter Fritz!Card PCI v2 at 0000:00:0a.0
Nov 18 14:54:02 studienpraefekt kernel: Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP:
Nov 18 14:54:02 studienpraefekt kernel:  [<0000000000000000>]
Nov 18 14:54:02 studienpraefekt kernel: PGD 240ee067 PUD 3effd067 PMD 0
Nov 18 14:54:02 studienpraefekt kernel: Oops: 0010 [1] SMP
Nov 18 14:54:02 studienpraefekt kernel: CPU 0
Nov 18 14:54:02 studienpraefekt kernel: Modules linked in: hisax_fcpcipnp hisax_isac hisax crc_ccitt isdn slhc rfcomm l2cap bluetooth autofs4 nls_utf8 cifs sunrpc nf_conntrack_netbios_ns nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_REJECT ip6table_filter ip6_tables x_tables cpufreq_ondemand dm_multipath ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss nvidia(P)(U) snd_pcm parport_pc parport snd_timer snd button soundcore k8temp i2c_core floppy hwmon snd_page_alloc pcspkr r8169 usblp sr_mod sg cdrom usb_storage dm_snapshot dm_zero dm_mirror dm_mod sata_sis pata_sis ata_generic libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd
Nov 18 14:54:02 studienpraefekt kernel: Pid: 26799, comm: modprobe Tainted: P        2.6.23.1-49.fc8 #1
Nov 18 14:54:02 studienpraefekt kernel: RIP: 0010:[<0000000000000000>]  [<0000000000000000>]
Nov 18 14:54:02 studienpraefekt kernel: RSP: 0018:ffff810010341c50  EFLAGS: 00010046
Nov 18 14:54:02 studienpraefekt kernel: RAX: 0000000000000000 RBX: ffff810008758270 RCX: ffffffff8106a940
Nov 18 14:54:02 studienpraefekt kernel: RDX: 0000000000001c02 RSI: 0000000000000000 RDI: ffff810008758000
Nov 18 14:54:02 studienpraefekt kernel: RBP: ffff810008758000 R08: ffff810008758000 R09: ffffffff81281000
Nov 18 14:54:02 studienpraefekt kernel: R10: 00000000fffffff4 R11: 0000000080000000 R12: 0000000000000000
Nov 18 14:54:02 studienpraefekt kernel: R13: 0000000000000000 R14: ffffffff88a89f12 R15: 0000000000000080
Nov 18 14:54:02 studienpraefekt kernel: FS:  00002aaaaaadc6f0(0000) GS:ffffffff813bd000(0000) knlGS:00000000f7e266d0
Nov 18 14:54:02 studienpraefekt kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Nov 18 14:54:02 studienpraefekt kernel: CR2: 0000000000000000 CR3: 000000003202c000 CR4: 00000000000006e0
Nov 18 14:54:02 studienpraefekt kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Nov 18 14:54:02 studienpraefekt kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Nov 18 14:54:02 studienpraefekt kernel: Process modprobe (pid: 26799, threadinfo ffff810010340000, task ffff810021094820)
Nov 18 14:54:02 studienpraefekt kernel: Stack:  ffffffff88a89f60 ffffffff811640e4 0000000000000202 ffff810031b2b4c0
Nov 18 14:54:02 studienpraefekt kernel:  ffff810008758000 0000000000000011 ffffffff8106a97f ffffffff813782e0
Nov 18 14:54:02 studienpraefekt kernel:  ffffffff88a8a00b 01000000fffffff4 ffff810008758000 ffff810001ef3000
Nov 18 14:54:02 studienpraefekt kernel: Call Trace:
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff88a89f60>] :hisax_fcpcipnp:fcpci2_irq+0x4e/0x8e
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff811640e4>] acpi_pci_allocate_irq+0x0/0x4d
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff8106a97f>] request_irq+0xb1/0xe6
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff88a89548>] :hisax_fcpcipnp:fcpci_probe+0x1b9/0x441
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff8112da13>] pci_device_probe+0xd0/0x137
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff811963e2>] driver_probe_device+0xff/0x17c
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff811965a7>] __driver_attach+0x90/0xcc
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff81196517>] __driver_attach+0x0/0xcc
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff81196517>] __driver_attach+0x0/0xcc
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff81195786>] bus_for_each_dev+0x43/0x6e
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff81195afe>] bus_add_driver+0x7b/0x19d
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff8112dbde>] __pci_register_driver+0x58/0x8a
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff81056e25>] sys_init_module+0x15d5/0x173a
Nov 18 14:54:02 studienpraefekt kernel:  [<ffffffff8100bd45>] tracesys+0xd5/0xda

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] hisax_fcpcipnp: move request_irq later in probe
  2008-02-29 23:37 Hisax driver oopses when CONFIG_DEBUG_SHIRQ is enabled Chuck Ebbert
@ 2008-03-01 16:26 ` Kyle McMartin
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle McMartin @ 2008-03-01 16:26 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Karsten Keil, linux-kernel, akpm

After a quick glance at the code, we're getting the DEBUG_SHIRQ spurious
interrupt before we have the adapter template filled in. Real interrupts
appear to be turned on by fcpci*_init(), so move request_irq until just
before that.

Signed-off-by: Kyle McMartin <kmcmartin@redhat.com>

---
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index 7993e01..76043de 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -725,23 +725,6 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter)
 
 	switch (adapter->type) {
 	case AVM_FRITZ_PCIV2:
-		retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED,
-				     "fcpcipnp", adapter);
-		break;
-	case AVM_FRITZ_PCI:
-		retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED,
-				     "fcpcipnp", adapter);
-		break;
-	case AVM_FRITZ_PNP:
-		retval = request_irq(adapter->irq, fcpci_irq, 0,
-				     "fcpcipnp", adapter);
-		break;
-	}
-	if (retval)
-		goto err_region;
-
-	switch (adapter->type) {
-	case AVM_FRITZ_PCIV2:
 	case AVM_FRITZ_PCI:
 		val = inl(adapter->io);
 		break;
@@ -796,6 +779,23 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter)
 
 	switch (adapter->type) {
 	case AVM_FRITZ_PCIV2:
+		retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED,
+				     "fcpcipnp", adapter);
+		break;
+	case AVM_FRITZ_PCI:
+		retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED,
+				     "fcpcipnp", adapter);
+		break;
+	case AVM_FRITZ_PNP:
+		retval = request_irq(adapter->irq, fcpci_irq, 0,
+				     "fcpcipnp", adapter);
+		break;
+	}
+	if (retval)
+		goto err_region;
+
+	switch (adapter->type) {
+	case AVM_FRITZ_PCIV2:
 		fcpci2_init(adapter);
 		isacsx_setup(&adapter->isac);
 		break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-01 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 23:37 Hisax driver oopses when CONFIG_DEBUG_SHIRQ is enabled Chuck Ebbert
2008-03-01 16:26 ` [PATCH] hisax_fcpcipnp: move request_irq later in probe Kyle McMartin

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).