On 11/26/21 12:16 AM, Bart Van Assche wrote:
On 11/25/21 7:10 AM, Hannes Reinecke wrote:
+/**
+ * scsi_get_host_dev - Create a virtual scsi_device to the host adapter
^^^^^^
Attach?
It's just words ... sure I can change it.
@@ -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.
Actually a left-over from a different patch (to use 'real' inquiry data
for dummy devices). Will be removing it.
-#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?
Sure.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer