Skip to content

Commit 399d056

Browse files
committed
Fix bad bounds check for per-PASID MMIO areas
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
1 parent 8cb2e32 commit 399d056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mmio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ ocxl_err ocxl_mmio_map_advanced(ocxl_afu_h afu, ocxl_mmio_type type, size_t size
287287
break;
288288

289289
case OCXL_PER_PASID_MMIO:
290-
if (offset + size > afu->global_mmio.length) {
290+
if (offset + size > afu->per_pasid_mmio.length) {
291291
rc = OCXL_NO_MEM;
292292
errmsg(afu, rc, "Offset(%#x) + size(%#x) of per-pasid MMIO map request exceeds available size of %#x",
293293
offset, size, afu->global_mmio.length);

0 commit comments

Comments
 (0)