]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: target: Don't validate ignored fields in PROUT PREEMPT
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 2 Apr 2026 18:03:42 +0000 (14:03 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 9 Apr 2026 02:38:18 +0000 (22:38 -0400)
commit070ec6f691411f27e7a743841bdfb0bf604fbce2
tree8a2e6bce8f61e7257dd3d0343088f6e6f324dfb9
parent271aeff266c9ca97eae315d59ef0bfe0e4ce0a94
scsi: target: Don't validate ignored fields in PROUT PREEMPT

The PERSISTENT RESERVE OUT command's PREEMPT service action provides two
different functions: 1. preempting persistent reservations and 2.
removing registrations. In the latter case the spec says:

  b) ignore the contents of the SCOPE field and the TYPE field;

The code currently validates the SCOPE and TYPE fields even when PREEMPT
is called to remove registrations.

This patch achieves spec compliance by validating the SCOPE and TYPE
fields only when they will actually be used.

To confirm my interpretation of the specification I tested against HPE
3PAR storage and found the TYPE field is indeed ignored in this case.

Cc: Maurizio Lombardi <mlombard@redhat.com>
Cc: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://patch.msgid.link/20260402180342.126583-1-stefanha@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_pr.c