Re: [PATCH] scsi: ch: Do not keep references to data transfer element devices

From: Ahmed Abdelhaleem Ahmed

Date: Thu Sep 24 2026 - 02:05:05 EST


> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")

Self-correction: that Fixes tag is wrong. drivers/scsi/ch.c is not part of
the initial git import; it was added a month later, already containing the
lookup into ch->dt[] and the kfree() that drops nothing:

$ git cat-file -t v2.6.12-rc2:drivers/scsi/ch.c
fatal: Not a valid object name v2.6.12-rc2:drivers/scsi/ch.c

$ git log --diff-filter=A --oneline -- drivers/scsi/ch.c
daa6eda65a53 [SCSI] add scsi changer driver

So the correct tag is

Fixes: daa6eda65a53 ("[SCSI] add scsi changer driver")

first released in v2.6.13-rc1. Nothing since has touched the ch->dt[]
reference handling: the only other commits mentioning scsi_device_put() or
ch->dt in this file are 66167283c21e ("scsi: ch: fixup refcounting imbalance
for SCSI devices"), which does not touch dt[], a2cf8a6306c8 ("[SCSI] ch:
Check NULL for kmalloc() return") and 85bc081f44d5 (kmalloc -> kcalloc).

Please amend when applying, or say the word and I will send a v2.

Thanks,
Ahmed