From ff6041afdf2df9f048aa192f602c191e96ce92fd Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Sun, 14 Jan 2024 10:49:57 +0200 Subject: [PATCH] intel/aux_map: fix fallback unmapping range on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Fixes: 7c6faa1efe ("intel/aux_map: introduce ref count of L1 entries") Reviewed-by: Tapani Pälli Part-of: --- src/intel/common/intel_aux_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/common/intel_aux_map.c b/src/intel/common/intel_aux_map.c index 3040d25d6dc..2804e30ec77 100644 --- a/src/intel/common/intel_aux_map.c +++ b/src/intel/common/intel_aux_map.c @@ -728,7 +728,7 @@ intel_aux_map_add_mapping(struct intel_aux_map_context *ctx, uint64_t main_addre if (!success && (main_inc_addr - main_address) > 0) { /* If the mapping failed, remove the mapped portion. */ remove_mapping_locked(ctx, main_address, - main_size_B - (main_inc_addr - main_address), + main_inc_addr - main_address, false /* reset_refcount */, &state_changed); } pthread_mutex_unlock(&ctx->mutex);