the patch below fixes a bootup-crash bug merged via today's SCSI git
merge:
commit df3d80f5a5c74168be42788364d13cf6c83c7b9c
Merge: 3d06f7a... c8e91b0...
Author: Linus Torvalds <[email protected]>
Date: Mon Oct 15 08:19:33 2007 -0700
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
--------------------->
Subject: scsi: fix crash in gdth_timeout()
From: Ingo Molnar <[email protected]>
fix the following bootup crash in gdth_timeout():
[ 40.739625] BUG: spinlock bad magic on CPU#1, swapper/1
[ 40.744822] lock: 788a6e40, .magic: 784d8cec, .owner: <none>/-1, .owner_cpu: 2018346022
[ 40.752881] [<78104f2c>] show_trace_log_lvl+0x1a/0x2f
[ 40.757994] [<781058d1>] show_trace+0x12/0x14
[ 40.762414] [<781058e9>] dump_stack+0x16/0x18
[ 40.766833] [<782f1683>] spin_bug+0xa1/0xa9
[ 40.771079] [<782f17b0>] _raw_spin_lock+0x1e/0xe4
[ 40.775846] [<78643f9f>] _spin_lock_irqsave+0x53/0x64
[ 40.781461] [<784b224a>] gdth_timeout+0x1c/0xa6
[ 40.786054] [<7812632f>] run_timer_softirq+0x142/0x1a4
[ 40.791254] [<78123fb8>] __do_softirq+0x7b/0xf1
[ 40.795847] [<78105fb8>] do_softirq+0x61/0xc7
[ 40.800267] =======================
the bug is that list_first_entry() assumes a non-empty list.
A further problem is probably that the GDTH timer is not stopped by a
failed GDTH probe?
Signed-off-by: Ingo Molnar <[email protected]>
---
drivers/scsi/gdth.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux/drivers/scsi/gdth.c
===================================================================
--- linux.orig/drivers/scsi/gdth.c
+++ linux/drivers/scsi/gdth.c
@@ -3793,6 +3793,9 @@ static void gdth_timeout(ulong data)
gdth_ha_str *ha;
ulong flags;
+ if (list_empty(&gdth_instances))
+ return;
+
ha = list_first_entry(&gdth_instances, gdth_ha_str, list);
spin_lock_irqsave(&ha->smp_lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]