diff options
| author | Stanley Jhu <stanleyjhu@google.com> | 2026-10-13 21:27:08 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-14 22:14:52 -0400 |
| commit | ec6b083915e8146e147314a5f4f1285d07b57bfc (patch) | |
| tree | 0a7433878e60ace4021e74133b057a8a21d4380c /scripts/Makefile.thinlto | |
| parent | 81e097a064b28b4a1f6ca1a8b433e659c1bd64c0 (diff) | |
| download | linux-next-ec6b083915e8146e147314a5f4f1285d07b57bfc.tar.gz linux-next-ec6b083915e8146e147314a5f4f1285d07b57bfc.zip | |
scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per
job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct
ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command
returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right after
the 40-byte header and writes 8 bytes past the end of the buffer.
Let each BSG transport pass its reply buffer size to bsg_setup_queue()
and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full
reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE.
Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg")
Cc: stable@vger.kernel.org
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Link: https://patch.msgid.link/20261013132708.1669415-1-stanleyjhu@google.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
