Re: [PATCH] scsi: imm: fix use-after-free bugs caused by unfinished delayed work

From: Martin K. Petersen
Date: Mon Dec 08 2025 - 22:21:39 EST


On Tue, 28 Oct 2025 18:01:49 +0800, Duoming Zhou wrote:

> The delayed work item imm_tq is initialized in imm_attach() and
> scheduled via imm_queuecommand() for processing SCSI commands.
> When the IMM parallel port SCSI host adapter is detached through
> imm_detach(), the imm_struct device instance is deallocated.
>
> However, the delayed work might still be pending or executing
> when imm_detach() is called, leading to use-after-free bugs
> when the work function imm_interrupt() accesses the already
> freed imm_struct memory.
>
> [...]

Applied to 6.19/scsi-queue, thanks!

[1/1] scsi: imm: fix use-after-free bugs caused by unfinished delayed work
https://git.kernel.org/mkp/scsi/c/ab58153ec64f

--
Martin K. Petersen