diff options
| author | Lu Baolu <baolu.lu@linux.intel.com> | 2026-09-28 11:27:17 +0800 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-09-28 10:17:41 +0200 |
| commit | 12a2ea2d91bea9b1f8f0a6608433210d0abd1291 (patch) | |
| tree | 4a93e74283da48529d20cd530d3ed1a24c00a674 /scripts/basic | |
| parent | 53e15f28829ff304f94883e8f3f1f5074aa2a0a2 (diff) | |
| download | linux-12a2ea2d91bea9b1f8f0a6608433210d0abd1291.tar.gz linux-12a2ea2d91bea9b1f8f0a6608433210d0abd1291.zip | |
iommu/vt-d: Handle DID reservation errors when copying context tables
When kdump reuses old translation tables, all old domain IDs (DIDs) must
be reserved in the new kernel before new domains are created. Today
copy_context_table() ignores ida_alloc_range() return values, so a real
-ENOMEM can be missed and an ID may stay unreserved.
That can allow DID reuse while stale hardware cache entries still exist,
risking domain aliasing.
Fix this by moving DID reservation into a helper that:
- treats duplicate reservations (-ENOSPC) as expected success,
- skips out-of-range IDs as success,
- propagates real allocation failures (like -ENOMEM), and
- normalize successful return values.
On failure, unwind as in existing copy-allocation failure paths.
Fixes: f93b4ac5929a ("iommu/vt-d: Use ida to manage domain id")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
