public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Trivial Russell <rusty@rustcorp.com.au>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Achim Leubner <achim@vortex.de>, linux-scsi@vger.kernel.org
Subject: [TRIVIAL] [Trivial Patch] scsi_register-004
Date: Mon, 23 Jun 2003 16:56:39 +1000	[thread overview]
Message-ID: <20030623070135.83F4D2C274@lists.samba.org> (raw)

(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

             reply	other threads:[~2003-06-23  6:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-23  6:56 Rusty Trivial Russell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-06  3:11 [TRIVIAL] [Trivial Patch] scsi_register-004 Rusty Trivial Russell
2002-12-16 10:39 Rusty Trivial Russell
2002-11-08  8:25 Rusty Trivial Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030623070135.83F4D2C274@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=achim@vortex.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox