Den 2023-07-21 kl. 19:05, skrev Greg Kroah-Hartman:
> From: Christian König <christian.koenig(a)amd.com>
>
> commit a2848d08742c8e8494675892c02c0d22acbe3cf8 upstream.
>
> There is a small window where we have already incremented the pin count
> but not yet moved the bo from the lru to the pinned list.
>
> Signed-off-by: Christian König <christian.koenig(a)amd.com>
> Reported-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer(a)amd.com>
> Tested-by: Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer(a)amd.com>
> Acked-by: Alex Deucher <alexander.deucher(a)amd.com>
> Cc: stable(a)vger.kernel.org
> Link: https://patchwork.freedesktop.org/patch/msgid/20230707120826.3701-1-christi…
> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
> ---
> drivers/gpu/drm/ttm/ttm_bo.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -517,6 +517,12 @@ static bool ttm_bo_evict_swapout_allowab
> {
> bool ret = false;
>
> + if (bo->pin_count) {
> + *locked = false;
> + *busy = false;
> + return false;
> + }
> +
> if (bo->base.resv == ctx->resv) {
> dma_resv_assert_held(bo->base.resv);
> if (ctx->allow_res_evict)
>
This one will trigger GPF and needs a follow-up fix that is not upstream
yet:
https://patchwork.freedesktop.org/patch/547897/
as reported on LKML in thread:
[bug/bisected] commit a2848d08742c8e8494675892c02c0d22acbe3cf8 cause
general protection fault, probably for non-canonical address
0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
--
Thomas