Skip to content

Commit d6077df

Browse files
vcgomesvinodkoul
authored andcommitted
dmaengine: idxd: Fix possible invalid memory access after FLR
In the case that the first Function Level Reset (FLR) concludes correctly, but in the second FLR the scratch area for the saved configuration cannot be allocated, it's possible for a invalid memory access to happen. Always set the deallocated scratch area to NULL after FLR completes. Fixes: 98d187a ("dmaengine: idxd: Enable Function Level Reset (FLR) for halt") Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Link: https://patch.msgid.link/20260121-idxd-fix-flr-on-kernel-queues-v3-v3-3-7ed70658a9d1@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 52d2ede commit d6077df

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/dma/idxd/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@ static void idxd_reset_done(struct pci_dev *pdev)
11461146
}
11471147
out:
11481148
kfree(idxd->idxd_saved);
1149+
idxd->idxd_saved = NULL;
11491150
}
11501151

11511152
static const struct pci_error_handlers idxd_error_handler = {

0 commit comments

Comments
 (0)