Skip to content

Commit 867d0c8

Browse files
vcgomesgregkh
authored andcommitted
dmaengine: idxd: Fix possible invalid memory access after FLR
[ Upstream commit d6077df ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0e76107 commit 867d0c8

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
@@ -1137,6 +1137,7 @@ static void idxd_reset_done(struct pci_dev *pdev)
11371137
}
11381138
out:
11391139
kfree(idxd->idxd_saved);
1140+
idxd->idxd_saved = NULL;
11401141
}
11411142

11421143
static const struct pci_error_handlers idxd_error_handler = {

0 commit comments

Comments
 (0)