Re: git-scsi-misc oops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2006-09-05 at 23:19 -0700, Andrew Morton wrote:
> aic79xxx isn't happy.  Using
> git+ssh://master.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git,
> no other patches applied.

Try this, please:

James

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index eedfd05..c35f5fc 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -873,10 +873,12 @@ EXPORT_SYMBOL(scsi_device_get);
  */
 void scsi_device_put(struct scsi_device *sdev)
 {
+	struct module *module = sdev->host->hostt->module;
+
 	/* The module refcount will be zero if scsi_device_get()
 	 * was called from a module removal routine */
-	if (likely(module_refcount(sdev->host->hostt->module) != 0))
-		module_put(sdev->host->hostt->module);
+	if (module && module_refcount(module) != 0)
+		module_put(module);
 	put_device(&sdev->sdev_gendev);
 }
 EXPORT_SYMBOL(scsi_device_put);


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux