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, 16 Dec 2002 21:39:43 +1100 [thread overview]
Message-ID: <20021216210038.43BA32C293@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.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
next reply other threads:[~2002-12-16 10:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 10:39 Rusty Trivial Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-06-23 6:56 [TRIVIAL] [Trivial Patch] scsi_register-004 Rusty Trivial Russell
2003-02-06 3:11 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=20021216210038.43BA32C293@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