Re: [PATCH] scsi: scsi_debug: fix one-partition tape setup bounds

From: Samuel Moelius

Date: Wed Jun 03 2026 - 17:41:21 EST


On Wed, Jun 3, 2026 at 4:45 PM James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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.

Please disregard this patch. I will submit a new one.