summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorVadim Nikitushkin <bub4z0r@gmail.com>2026-09-10 17:34:51 +0300
committerChristian König <christian.koenig@amd.com>2026-09-10 18:01:41 +0200
commitfcfe64715b425262af1b36f498f9197f3537ceed (patch)
tree609b016123404234bacb612f43e0470507e66fa3 /drivers/dma-buf
parent3db7d7d583419f7b1f2e141e36418802dbb25cf8 (diff)
downloadlinux-next-fcfe64715b425262af1b36f498f9197f3537ceed.tar.gz
linux-next-fcfe64715b425262af1b36f498f9197f3537ceed.zip
drm/ttm: apply the swapout bulk_move fix to the intended condition
Commit 3db7d7d58341 ("drm/ttm: fix swapped-out resources never leaving their bulk_move range") landed in drm-misc-fixes with its one-line change applied to the wrong "if": the "if (ret)" after ttm_resource_try_charge() in ttm_bo_alloc_at_place() became "if (ret > 0)", while the "if (!ret)" after ttm_tt_swapout() in ttm_bo_swapout_cb() that the patch targeted was left untouched. ttm_resource_try_charge() returns 0 or a negative error code, so with "ret > 0" a failed dmem cgroup charge no longer fails the allocation. Restore that check and apply the intended change: ttm_tt_swapout() returns the number of pages swapped out on success, so the bulk_move removal must run for ret > 0. Fixes: 3db7d7d58341 ("drm/ttm: fix swapped-out resources never leaving their bulk_move range") Cc: stable@vger.kernel.org # v7.1+ Signed-off-by: Vadim Nikitushkin <bub4z0r@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/20260910143451.65853-1-bub4z0r@gmail.com
Diffstat (limited to 'drivers/dma-buf')
0 files changed, 0 insertions, 0 deletions