Patch "nouveau/uvmm: fix addr/range calcs for remap operations" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nouveau/uvmm: fix addr/range calcs for remap operations

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nouveau-uvmm-fix-addr-range-calcs-for-remap-operatio.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cd1302ce0f3d6bf0d883a2609e4095651b153f15
Author: Dave Airlie <airlied@xxxxxxxxxx>
Date:   Thu Mar 28 12:43:16 2024 +1000

    nouveau/uvmm: fix addr/range calcs for remap operations
    
    [ Upstream commit be141849ec00ef39935bf169c0f194ac70bf85ce ]
    
    dEQP-VK.sparse_resources.image_rebind.2d_array.r64i.128_128_8
    was causing a remap operation like the below.
    
    op_remap: prev: 0000003fffed0000 00000000000f0000 00000000a5abd18a 0000000000000000
    op_remap: next:
    op_remap: unmap: 0000003fffed0000 0000000000100000 0
    op_map: map: 0000003ffffc0000 0000000000010000 000000005b1ba33c 00000000000e0000
    
    This was resulting in an unmap operation from 0x3fffed0000+0xf0000, 0x100000
    which was corrupting the pagetables and oopsing the kernel.
    
    Fixes the prev + unmap range calcs to use start/end and map back to addr/range.
    
    Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
    Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
    Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
    Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240328024317.2041851-1-airlied@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
index 0a0a11dc9ec03..ee02cd833c5e4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
@@ -812,15 +812,15 @@ op_remap(struct drm_gpuva_op_remap *r,
 	struct drm_gpuva_op_unmap *u = r->unmap;
 	struct nouveau_uvma *uvma = uvma_from_va(u->va);
 	u64 addr = uvma->va.va.addr;
-	u64 range = uvma->va.va.range;
+	u64 end = uvma->va.va.addr + uvma->va.va.range;
 
 	if (r->prev)
 		addr = r->prev->va.addr + r->prev->va.range;
 
 	if (r->next)
-		range = r->next->va.addr - addr;
+		end = r->next->va.addr;
 
-	op_unmap_range(u, addr, range);
+	op_unmap_range(u, addr, end - addr);
 }
 
 static int




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux