Re: [PATCH] target/file: Use kzalloc_flex for aio_cmd
"Martin K. Petersen" <[email protected]>
| Newsgroups | org.kernel.vger.target-devel,org.kernel.vger.linux-scsi,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 14 Mar 2026 01:17:40 +0000, Thinh Nguyen wrote:
> The target_core_file doesn't initialize the aio_cmd->iocb for the
> ki_write_stream. When a write command fd_execute_rw_aio() is executed,
> we may get a bogus ki_write_stream value, causing unintended write
> failure status when checking iocb->ki_write_stream > max_write_streams
> in the block device.
>
> Let's just use kzalloc_flex when allocating the aio_cmd and let
> ki_write_stream=0 to fix this issue.
>
> [...]
Applied to 7.0/scsi-fixes, thanks!
[1/1] target/file: Use kzalloc_flex for aio_cmd
https://git.kernel.org/mkp/scsi/c/01f784fc9d0a
--
Martin K. Petersen