From: Tim Hockin <thockin@sun.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
alan@redhat.com, torvalds@transmeta.com
Subject: [PATCH] misc minor SCSI fixes
Date: Mon, 15 Oct 2001 19:19:58 -0700 [thread overview]
Message-ID: <3BCB994E.B443301C@sun.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
All,
Attached are a couple minor fixes to the SCSI subsystem. They're all
minor, and pretty obvious.
Please apply, or let me know whats wrong with them.
Thanks
Tim
--
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com
[-- Attachment #2: scsi-misc.diff --]
[-- Type: text/plain, Size: 1364 bytes --]
diff -ruN dist-2.4.12+patches/drivers/scsi/scsi.c cvs-2.4.12+patches/drivers/scsi/scsi.c
--- dist-2.4.12+patches/drivers/scsi/scsi.c Mon Oct 15 10:22:41 2001
+++ cvs-2.4.12+patches/drivers/scsi/scsi.c Mon Oct 15 10:22:41 2001
@@ -1836,6 +1837,8 @@
pcount = next_scsi_host;
+ MOD_INC_USE_COUNT;
+
/* The detect routine must carefully spinunlock/spinlock if
it enables interrupts, since all interrupt handlers do
spinlock as well.
@@ -1966,8 +1968,6 @@
(scsi_init_memory_start - scsi_memory_lower_value) / 1024,
(scsi_memory_upper_value - scsi_init_memory_start) / 1024);
#endif
-
- MOD_INC_USE_COUNT;
if (out_of_space) {
scsi_unregister_host(tpnt); /* easiest way to clean up?? */
diff -ruN dist-2.4.12+patches/drivers/scsi/sd.c cvs-2.4.12+patches/drivers/scsi/sd.c
--- dist-2.4.12+patches/drivers/scsi/sd.c Mon Oct 15 10:22:41 2001
+++ cvs-2.4.12+patches/drivers/scsi/sd.c Mon Oct 15 10:22:41 2001
@@ -152,6 +158,9 @@
int diskinfo[4];
SDev = rscsi_disks[DEVICE_NR(dev)].device;
+ if (!SDev)
+ return -ENODEV;
+
/*
* If we are in the middle of error recovery, don't let anyone
* else try and use this device. Also, if error recovery fails, it
@@ -533,6 +546,8 @@
target = DEVICE_NR(inode->i_rdev);
SDev = rscsi_disks[target].device;
+ if (!SDev)
+ return -ENODEV;
SDev->access_count--;
reply other threads:[~2001-10-16 2:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3BCB994E.B443301C@sun.com \
--to=thockin@sun.com \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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