diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-05-15 23:52:21 +0300 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2026-05-23 04:49:05 +0300 |
| commit | 20fd1648f35399f114351b67c14ff8d3233a30e2 (patch) | |
| tree | e50449d0be63b917d4ce3a9d7f7511d689ba8abf /scripts/cleanpatch | |
| parent | 28ff38b9d8e1a189606e36319401dc98419a3746 (diff) | |
| download | linux-20fd1648f35399f114351b67c14ff8d3233a30e2.tar.xz | |
scsi: core: Convert INQUIRY information
Currently the vendor, model, and revision members of struct scsi_device
are pointers to fixed-length strings that are not NUL-terminated.
Fixed-precision format specifiers (e.g., "%.8s") are required whenever
they are printed and strncmp() must be used to compare these fields.
This is error-prone.
Convert these fields to fixed-size character arrays within struct
scsi_device. Remove an !sdev->model check because sdev->model is now
guaranteed not to be NULL.
This patch fixes a bug in the qla2xxx driver. It makes the following
code safe:
if (state_flags & BIT_4)
scmd_printk(KERN_WARNING, cp,
"Unsupported device '%s' found.\n",
cp->device->vendor);
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Brian Bunker <brian@purestorage.com>
Link: https://patch.msgid.link/20260515205222.1754621-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/cleanpatch')
0 files changed, 0 insertions, 0 deletions
