#47 Fix crash in radeon_bo_can_reclaim_slab
Merged a month ago by jexposit. Opened 2 months ago by jexposit.
rpms/ jexposit/mesa bz2267124  into  rawhide

@@ -0,0 +1,35 @@ 

+ From 99017891cad55972c26c0ca8354f48e722b37a66 Mon Sep 17 00:00:00 2001

+ From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

+ Date: Mon, 18 Mar 2024 11:52:50 +0100

+ Subject: [PATCH] winsys/radeon: pass priv instead NULL to

+  radeon_bo_can_reclaim

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ This fixes a NULL pointer issue.

+ 

+ Fixes: 4a078e693e9 ("r300,r600,radeon/winsys: always pass the winsys to radeon_bo_reference")

+ Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613

+ Reviewed-by: Marek Olšák <marek.olsak@amd.com>

+ Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28240>

+ ---

+  src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c

+ index 2e1d9c488e2..7979cad75fa 100644

+ --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c

+ +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c

+ @@ -729,7 +729,7 @@ bool radeon_bo_can_reclaim_slab(void *priv, struct pb_slab_entry *entry)

+  {

+     struct radeon_bo *bo = container_of(entry, struct radeon_bo, u.slab.entry);

+  

+ -   return radeon_bo_can_reclaim(NULL, &bo->base);

+ +   return radeon_bo_can_reclaim(priv, &bo->base);

+  }

+  

+  static void radeon_bo_slab_destroy(void *winsys, struct pb_buffer_lean *_buf)

+ -- 

+ 2.44.0

+ 

file modified
+1
@@ -79,6 +79,7 @@ 

  # Backport of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101

  # to fix LLVM 18 compatibility (https://bugzilla.redhat.com/show_bug.cgi?id=2268800).

  Patch20:        0001-Pass-no-verify-fixpoint-option-to-instcombine-in-LLV.patch

+ Patch21:        0001-winsys-radeon-pass-priv-instead-NULL-to-radeon_bo_ca.patch

  

  BuildRequires:  meson >= 1.3.0

  BuildRequires:  gcc

Apply the patch proposed in https://gitlab.freedesktop.org/mesa/mesa/-/issues/10613 to solve the crash.

A MR has not being opened upstream to solve this issue. I'll keep an eye on the issue to update the patch if required.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2267124

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/10db2f4644a4419daff04c7f5eea763a

rebased onto 3d4403c

2 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/43eca9cbe2b3497898e88e79bd00d05d

rebased onto d10c837

a month ago

rebased onto b676f3e

a month ago

Pull-Request has been merged by jexposit

a month ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/a56bf11bd381459d9c34ae691d63ee4e