public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL] [Trivial Patch] scsi_register-004
@ 2002-11-08  8:25 Rusty Trivial Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Trivial Russell @ 2002-11-08  8:25 UTC (permalink / raw)
  To: linux-scsi, achim

From:  Michael Still <mikal@stillhq.com>

  
  This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...
  
  
  
  

--- trivial-2.5-bk/drivers/scsi/gdth.c.orig	2002-11-08 18:47:03.000000000 +1100
+++ trivial-2.5-bk/drivers/scsi/gdth.c	2002-11-08 18:47:03.000000000 +1100
@@ -3991,6 +3991,9 @@
             break;
         if (gdth_search_isa(isa_bios)) {        /* controller found */
             shp = scsi_register(shtp,sizeof(gdth_ext_str));
+	    if(shp == NULL)
+		    continue;
+
             ha = HADATA(shp);
             if (!gdth_init_isa(isa_bios,ha)) {
                 scsi_unregister(shp);
-- 
  Don't blame me: the Monkey is driving
  File: Michael Still <mikal@stillhq.com>: [Trivial Patch] scsi_register-004

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

* [TRIVIAL] [Trivial Patch] scsi_register-004
@ 2002-12-16 10:39 Rusty Trivial Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Trivial Russell @ 2002-12-16 10:39 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Achim Leubner, linux-scsi

(Included in 2.5)
From:  Michael Still <mikal@stillhq.com>

  
  This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...
  
  
  
  

--- trivial-2.4.21-pre1/drivers/scsi/gdth.c.orig	2002-12-16 17:22:28.000000000 +1100
+++ trivial-2.4.21-pre1/drivers/scsi/gdth.c	2002-12-16 17:22:28.000000000 +1100
@@ -4029,6 +4029,9 @@
             break;
         if (gdth_search_isa(isa_bios)) {        /* controller found */
             shp = scsi_register(shtp,sizeof(gdth_ext_str));
+	    if(shp == NULL)
+		    continue;
+
             ha = HADATA(shp);
             if (!gdth_init_isa(isa_bios,ha)) {
                 scsi_unregister(shp);
-- 
  Don't blame me: the Monkey is driving
  File: Michael Still <mikal@stillhq.com>: [Trivial Patch] scsi_register-004

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

* [TRIVIAL] [Trivial Patch] scsi_register-004
@ 2003-02-06  3:11 Rusty Trivial Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Trivial Russell @ 2003-02-06  3:11 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Achim Leubner, linux-scsi

(Included in 2.5)
From:  Michael Still <mikal@stillhq.com>

  
  This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...
  
  
  
  

--- trivial-2.4.21-pre4/drivers/scsi/gdth.c.orig	2003-02-06 13:53:49.000000000 +1100
+++ trivial-2.4.21-pre4/drivers/scsi/gdth.c	2003-02-06 13:53:49.000000000 +1100
@@ -4029,6 +4029,9 @@
             break;
         if (gdth_search_isa(isa_bios)) {        /* controller found */
             shp = scsi_register(shtp,sizeof(gdth_ext_str));
+	    if(shp == NULL)
+		    continue;
+
             ha = HADATA(shp);
             if (!gdth_init_isa(isa_bios,ha)) {
                 scsi_unregister(shp);
-- 
  Don't blame me: the Monkey is driving
  File: Michael Still <mikal@stillhq.com>: [Trivial Patch] scsi_register-004

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

* [TRIVIAL] [Trivial Patch] scsi_register-004
@ 2003-06-23  6:56 Rusty Trivial Russell
  0 siblings, 0 replies; 4+ messages in thread
From: Rusty Trivial Russell @ 2003-06-23  6:56 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Achim Leubner, linux-scsi

(Included in 2.5)
From:  Michael Still <mikal@stillhq.com>

  
  This patch has been generated as part of my scsi_register audit of the 2.5.45 kernel tree. scsi_register() can fail, returning a NULL pointer, and the failure case was not being handled here...
  
  
  
  

--- trivial-2.4.22-pre1/drivers/scsi/gdth.c.orig	2003-06-23 16:39:34.000000000 +1000
+++ trivial-2.4.22-pre1/drivers/scsi/gdth.c	2003-06-23 16:39:34.000000000 +1000
@@ -4029,6 +4029,9 @@
             break;
         if (gdth_search_isa(isa_bios)) {        /* controller found */
             shp = scsi_register(shtp,sizeof(gdth_ext_str));
+	    if(shp == NULL)
+		    continue;
+
             ha = HADATA(shp);
             if (!gdth_init_isa(isa_bios,ha)) {
                 scsi_unregister(shp);
-- 
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving
  File: Michael Still <mikal@stillhq.com>: [Trivial Patch] scsi_register-004

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

end of thread, other threads:[~2003-06-23  6:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-23  6:56 [TRIVIAL] [Trivial Patch] scsi_register-004 Rusty Trivial Russell
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06  3:11 Rusty Trivial Russell
2002-12-16 10:39 Rusty Trivial Russell
2002-11-08  8:25 Rusty Trivial Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox