mirror-linux/include
Brian Kao 9a49157dee scsi: core: Fix error handler encryption support
Some low-level drivers (LLD) access block layer crypto fields, such as
rq->crypt_keyslot and rq->crypt_ctx within `struct request`, to
configure hardware for inline encryption.  However, SCSI Error Handling
(EH) commands (e.g., TEST UNIT READY, START STOP UNIT) should not
involve any encryption setup.

To prevent drivers from erroneously applying crypto settings during EH,
this patch saves the original values of rq->crypt_keyslot and
rq->crypt_ctx before an EH command is prepared via scsi_eh_prep_cmnd().
These fields in the 'struct request' are then set to NULL.  The original
values are restored in scsi_eh_restore_cmnd() after the EH command
completes.

This ensures that the block layer crypto context does not leak into EH
command execution.

Signed-off-by: Brian Kao <powenkao@google.com>
Link: https://patch.msgid.link/20251218031726.2642834-1-powenkao@google.com
Cc: stable@vger.kernel.org
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-01-04 15:16:20 -05:00
..
acpi
asm-generic hyperv-next for v6.19 2025-12-09 06:10:17 +09:00
clocksource
crypto
cxl
drm Cross-subsystem Changes: 2025-12-05 10:16:25 +10:00
dt-bindings This pull request is entirely SoC clk drivers, not for lack of trying to modify 2025-12-08 09:38:52 +09:00
hyperv mshv: Add definitions for MSHV sleep state configuration 2025-12-05 23:24:57 +00:00
keys
kunit
kvm
linux Misc fixes: 2025-12-14 06:07:09 +12:00
math-emu
media
memory
misc
net - fix a bug with O_APPEND in cached mode causing data to be written multiple times on server 2025-12-07 08:29:09 -08:00
pcmcia
ras Significant patch series in this merge are as follows: 2025-12-05 13:52:43 -08:00
rdma
rv
scsi scsi: core: Fix error handler encryption support 2026-01-04 15:16:20 -05:00
soc This pull request is entirely SoC clk drivers, not for lack of trying to modify 2025-12-08 09:38:52 +09:00
sound soundwire updates for 6.19 2025-12-13 16:26:55 +12:00
target
trace We have a patch that adds an initial set of tracepoints to the MDS 2025-12-14 15:24:10 +12:00
uapi sound fixes for 6.19-rc1 2025-12-13 16:09:10 +12:00
ufs
vdso
video
xen
Kbuild