Re: [PATCH] scsi: target: core: Parse APTPL res_type and res_scope as hex

From: Martin K. Petersen (Oracle)

Date: Sun Nov 08 2026 - 22:56:39 EST


On Sat, 31 Oct 2026 22:21:39 -0300, Ciro Iriarte wrote:

> core_scsi3_update_aptpl_buf() saves the reservation holder's type and
> scope to the APTPL metadata file as zero-padded hex ("res_type=%02x",
> "res_scope=%02x"), but target_pr_res_aptpl_metadata_store() reads them
> back with "%d" tokens and match_int(), which parse with base 0. A
> leading zero selects octal, so match_token() parses only the "0" of
> "res_type=08", the trailing "8" makes the token not match, and the field
> is ignored as unknown. An Exclusive Access - All Registrants holder
> (type 0x8) is left with type 0 and the write fails with -EINVAL and
>
> [...]

Applied to 7.4/scsi-fixes, thanks!

[1/1] scsi: target: core: Parse APTPL res_type and res_scope as hex
https://git.kernel.org/mkp/scsi/c/08f08a6d49ef

--
Martin K. Petersen