diff options
| author | Nikhil P. Rao <nikhil.rao@amd.com> | 2026-06-05 00:36:37 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-09 03:19:56 +0300 |
| commit | 6443f4f20bdae726fe01cf5946fba9742a0ffda6 (patch) | |
| tree | 0935e59d6b1683002abc25655cd62d2852e9d478 /include | |
| parent | b8e40c907bd201ee90524b8a8da6d2ab8cc7c004 (diff) | |
| download | linux-6443f4f20bdae726fe01cf5946fba9742a0ffda6.tar.xz | |
pds_core: quiesce DMA before freeing resources
pdsc_teardown() frees DMA buffers but does not disable bus mastering,
leaving the device able to perform DMA after the buffers are freed.
This can lead to use-after-free if the device writes to freed memory.
Add pci_clear_master() to pdsc_teardown() to disable bus mastering
before freeing resources, ensuring all DMA is quiesced.
Add pci_set_master() to pdsc_setup() to re-enable bus mastering,
which is needed for the firmware recovery path since pdsc_teardown()
now disables it.
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
Link: https://patch.msgid.link/20260604213637.3844317-1-nikhil.rao@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
