From: Rusty Trivial Russell <rusty@rustcorp.com.au>
To: linux-scsi@vger.kernel.org, achim@vortex.de
Subject: [TRIVIAL] [Trivial Patch] scsi_register-004
Date: Fri, 08 Nov 2002 19:25:44 +1100 [thread overview]
Message-ID: <20021108083828.03AD32C3F3@lists.samba.org> (raw)
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
next reply other threads:[~2002-11-08 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-08 8:25 Rusty Trivial Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-16 10:39 [TRIVIAL] [Trivial Patch] scsi_register-004 Rusty Trivial Russell
2003-02-06 3:11 Rusty Trivial Russell
2003-06-23 6:56 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=20021108083828.03AD32C3F3@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=achim@vortex.de \
--cc=linux-scsi@vger.kernel.org \
/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