aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
diff options
context:
space:
mode:
authorBaolin Wang <[email protected]>2024-12-19 07:30:08 +0000
committerAndrew Morton <[email protected]>2024-12-31 01:59:09 +0000
commitd0e6983a6d1719738cf8d13982a68094f0a1872a (patch)
tree3d0c0a8f384da2cbeb0e5c5c724802cfb67d2699 /drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
parentpercpu: remove intermediate variable in PERCPU_PTR() (diff)
downloadkernel-d0e6983a6d1719738cf8d13982a68094f0a1872a.tar.gz
kernel-d0e6983a6d1719738cf8d13982a68094f0a1872a.zip
mm: shmem: fix incorrect index alignment for within_size policy
With enabling the shmem per-size within_size policy, using an incorrect 'order' size to round_up() the index can lead to incorrect i_size checks, resulting in an inappropriate large orders being returned. Changing to use '1 << order' to round_up() the index to fix this issue. Additionally, adding an 'aligned_index' variable to avoid affecting the index checks. Link: https://lkml.kernel.org/r/77d8ef76a7d3d646e9225e9af88a76549a68aab1.1734593154.git.baolin.wang@linux.alibaba.com Fixes: e7a2ab7b3bb5 ("mm: shmem: add mTHP support for anonymous shmem") Signed-off-by: Baolin Wang <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c')
0 files changed, 0 insertions, 0 deletions