aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorVlastimil Babka <[email protected]>2022-12-16 16:32:27 +0000
committerAndrew Morton <[email protected]>2022-12-21 22:31:51 +0000
commit6f12be792fde994ed934168f93c2a0d2a0cf0bc5 (patch)
treef316d96e3d8f984321769fe6cf24e08f29c2c4b7 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentMerge branch 'linus' (diff)
downloadkernel-6f12be792fde994ed934168f93c2a0d2a0cf0bc5.tar.gz
kernel-6f12be792fde994ed934168f93c2a0d2a0cf0bc5.zip
mm, mremap: fix mremap() expanding vma with addr inside vma
Since 6.1 we have noticed random rpm install failures that were tracked to mremap() returning -ENOMEM and to commit ca3d76b0aa80 ("mm: add merging after mremap resize"). The problem occurs when mremap() expands a VMA in place, but using an starting address that's not vma->vm_start, but somewhere in the middle. The extension_pgoff calculation introduced by the commit is wrong in that case, so vma_merge() fails due to pgoffs not being compatible. Fix the calculation. By the way it seems that the situations, where rpm now expands a vma from the middle, were made possible also due to that commit, thanks to the improved vma merging. Yet it should work just fine, except for the buggy calculation. Link: https://lkml.kernel.org/r/[email protected] Reported-by: Jiri Slaby <[email protected]> Link: https://bugzilla.suse.com/show_bug.cgi?id=1206359 Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize") Signed-off-by: Vlastimil Babka <[email protected]> Cc: Jakub MatÄ›na <[email protected]> Cc: "Kirill A . Shutemov" <[email protected]> Cc: Liam Howlett <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions