Re: [PATCH] scsi: scsi_debug: fix one-partition tape setup bounds
From: James Bottomley
Date: Wed Jun 03 2026 - 16:50:33 EST
On Wed, 2026-06-03 at 18:25 +0000, Samuel Moelius wrote:
> The tape setup path writes partition metadata one element past the
> allocated tape_blocks array when a one-partition configuration is
> selected.
I don't think that's correct. tape_blocks is defined in struct
sdebug_dev_info as
struct tape_block *tape_blocks[TAPE_MAX_PARTITIONS];
so tape_blocks[1] is always allocated. You can argue it shouldn't be
written to even though it is allocated, but that's not what you wrote.
Regards,
James