Re: [patch] scsi: fix crash in gdth_timeout()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <linux-kernel@...>, Boaz Harrosh <bharrosh@...>, James Bottomley <James.Bottomley@...>
Date: Monday, October 15, 2007 - 1:08 pm

On Mon, 15 Oct 2007, Ingo Molnar wrote:

Indeed. Maybe this is a better fix?

That driver is pretty messy, and this should have been found ealier. 
James? Boaz?

		Linus

---
 drivers/scsi/gdth.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index e8010a7..3ac080e 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -5213,6 +5213,10 @@ static int __init gdth_init(void)
 #endif /* CONFIG_PCI */
 
 	TRACE2(("gdth_detect() %d controller detected\n", gdth_ctr_count));
+
+	if (list_empty(&gdth_instances))
+		return -ENODEV;
+
 #ifdef GDTH_STATISTICS
 	TRACE2(("gdth_detect(): Initializing timer !\n"));
 	init_timer(&gdth_timer);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] scsi: fix crash in gdth_timeout(), Ingo Molnar, (Mon Oct 15, 12:55 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Linus Torvalds, (Mon Oct 15, 1:08 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), James Bottomley, (Mon Oct 15, 5:55 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Ingo Molnar, (Mon Oct 15, 3:24 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Jeff Garzik, (Mon Oct 15, 1:57 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Boaz Harrosh, (Mon Oct 15, 2:43 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Ingo Molnar, (Mon Oct 15, 3:27 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Linus Torvalds, (Mon Oct 15, 3:38 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Ingo Molnar, (Mon Oct 15, 6:23 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Alan Cox, (Mon Oct 15, 4:08 pm)
Re: [patch] scsi: fix crash in gdth_timeout(), Linus Torvalds, (Mon Oct 15, 4:15 pm)