Re: [PATCH 01/15] scsi: allocate host device

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

 



On 11/25/21 7:10 AM, Hannes Reinecke wrote:
+/**
+ * scsi_get_host_dev - Create a virtual scsi_device to the host adapter
                          ^^^^^^
                          Attach?

@@ -500,7 +500,8 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
  		kfree_rcu(vpd_pg80, rcu);
  	if (vpd_pg89)
  		kfree_rcu(vpd_pg89, rcu);
-	kfree(sdev->inquiry);
+	if (!scsi_device_is_host_dev(sdev))
+		kfree(sdev->inquiry);
  	kfree(sdev);

kfree() accepts a NULL pointer so please leave out the new if-test.

-#define MODULE_ALIAS_SCSI_DEVICE(type) \
+#define MODULE_ALIAS_SCSI_DEVICE(type)			\
  	MODULE_ALIAS("scsi:t-" __stringify(type) "*")

The above change seems not related to the rest of this patch? Can it be left out?

Otherwise this patch looks good to me.

Thanks,

Bart.



[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