From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E636B2C1BE for ; Fri, 24 Nov 2023 14:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="y0zmmY8S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72AF4C433CA; Fri, 24 Nov 2023 14:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700835274; bh=Wg7qVkHYHCUiDwBT2A9RKAwtM58Wh3lQWMLJiQIBhVs=; h=Subject:To:Cc:From:Date:From; b=y0zmmY8S8SjDzpIGmAVNOGG8XMPqvLIXp0j1fZPlHNQCg9vFkj667yAsBrRq0yQw+ 7ioLrS2RVAgu6K1PzwT9f1p3KfyjWaIeBI9A5I1axFaHgLMUMdVp0JIvfxsyqbrqvU /xZ6I8V+a2xjf6Lgw6efVLN2GXMy3CWa1AO5sLXw= Subject: FAILED: patch "[PATCH] drm/amdgpu: add missing NULL check" failed to apply to 6.6-stable tree To: christian.koenig@amd.com,alexander.deucher@amd.com Cc: From: Date: Fri, 24 Nov 2023 14:14:32 +0000 Message-ID: <2023112432-leotard-abnormal-2b87@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 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 . 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 # git commit -s git send-email --to '' --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?= 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. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2902 Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher CC: stable@vger.kernel.org diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h index f3ee83cdf97e..d28e21baef16 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h @@ -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);