aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-memset.c
diff options
context:
space:
mode:
authorLiam R. Howlett <[email protected]>2023-09-28 13:24:32 -0400
committerAndrew Morton <[email protected]>2023-10-06 14:11:38 -0700
commit51f625377561e5b167da2db5aafb7ee268f691c5 (patch)
tree3d991b1c5d37886d6948318e44aa7aae6950fcb2 /lib/test_fortify/write_overflow-memset.c
parent61e21cf2d2c3cc5e60e8d0a62a77e250fccda62c (diff)
mm/mempolicy: fix set_mempolicy_home_node() previous VMA pointer
The two users of mbind_range() are expecting that mbind_range() will update the pointer to the previous VMA, or return an error. However, set_mempolicy_home_node() does not call mbind_range() if there is no VMA policy. The fix is to update the pointer to the previous VMA prior to continuing iterating the VMAs when there is no policy. Users may experience a WARN_ON() during VMA policy updates when updating a range of VMAs on the home node. Link: https://lkml.kernel.org/r/[email protected] Link: https://lore.kernel.org/linux-mm/CALcu4rbT+fMVNaO_F2izaCT+e7jzcAciFkOvk21HGJsmLcUuwQ@mail.gmail.com/ Fixes: f4e9e0e69468 ("mm/mempolicy: fix use-after-free of VMA iterator") Signed-off-by: Liam R. Howlett <[email protected]> Reported-by: Yikebaer Aizezi <[email protected]> Closes: https://lore.kernel.org/linux-mm/CALcu4rbT+fMVNaO_F2izaCT+e7jzcAciFkOvk21HGJsmLcUuwQ@mail.gmail.com/ Reviewed-by: Lorenzo Stoakes <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memset.c')
0 files changed, 0 insertions, 0 deletions