aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorGravatar Liam R. Howlett <Liam.Howlett@oracle.com> 2023-02-24 16:20:55 -0500
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2023-02-25 20:16:48 -0800
commit2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c (patch)
treeca6494148a02cbc7ecf9b27340c134d6dad47e23 /drivers/media
parentMerge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cl... (diff)
downloadlinux-2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c.tar.gz
linux-2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c.tar.bz2
linux-2fcd07b7ccd5fd10b2120d298363e4e6c53ccf9c.zip
mm/mprotect: Fix successful vma_merge() of next in do_mprotect_pkey()
If mprotect_fixup() successfully calls vma_merge() and replaces vma and the next vma, then the tmp variable in the do_mprotect_pkey() is not updated to point to the new vma end. This results in the loop detecting a gap between VMAs that does not exist. Fix the faulty value of tmp by setting it to the end location of the vma iterator at the end of the loop. Link: https://lkml.kernel.org/r/20230224212055.1786100-1-Liam.Howlett@oracle.com Fixes: 2286a6914c77 ("mm: change mprotect_fixup to vma iterator") Link: https://lore.kernel.org/linux-mm/20230223120407.729110a6ecd1416ac59d9cb0@linux-foundation.org/ Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reported-by: Bert Karwatzki <spasswolf@web.de> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217061 Tested-by: Bert Karwatzki <spasswolf@web.de> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/linux-mm/CAHk-=wjFmVL7NiuxL54qLkoabni_yD-oF9=dpDgETtdsiCbhUg@mail.gmail.com/ Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions