FAILED: patch "[PATCH] drm/amdgpu: add missing NULL check" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 31220ee9dc5a3e25d38d29d3816b6e79d8c39abc
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023112432-leotard-abnormal-2b87@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
31220ee9dc5a ("drm/amdgpu: add missing NULL check")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 31220ee9dc5a3e25d38d29d3816b6e79d8c39abc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Fri, 6 Oct 2023 14:04:04 +0200
Subject: [PATCH] drm/amdgpu: add missing NULL check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
bo->tbo.resource can easily be NULL here.
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +1 -1
@@ -252,7 +252,7 @@ static inline bool amdgpu_bo_in_cpu_visible_vram(struct amdgpu_bo *bo)struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev);struct amdgpu_res_cursor cursor; -if (bo->tbo.resource->mem_type !=TTM_PL_VRAM ) +if (!bo->tbo.resource || bo->tbo.resource->mem_type !=TTM_PL_VRAM )return false;amdgpu_res_first (bo->tbo.resource,0 ,amdgpu_bo_size (bo), &cursor);