summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2026-05-15 13:52:21 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2026-05-22 21:49:05 -0400
commit20fd1648f35399f114351b67c14ff8d3233a30e2 (patch)
treee50449d0be63b917d4ce3a9d7f7511d689ba8abf /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git
parent28ff38b9d8e1a189606e36319401dc98419a3746 (diff)
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 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions