diff options
author | Liam R. Howlett <[email protected]> | 2023-07-11 13:50:20 -0400 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-07-17 12:53:21 -0700 |
commit | 2658f94d679243209889cdfa8de3743cde1abea9 (patch) | |
tree | 4d45ea9c8bc5d8b29f7b21cd7d7bc3c90c481ecd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 636e348353a7cc52609fdba5ff3270065da140d5 (diff) |
mm/mlock: fix vma iterator conversion of apply_vma_lock_flags()
apply_vma_lock_flags() calls mlock_fixup(), which could merge the VMA
after where the vma iterator is located. Although this is not an issue,
the next iteration of the loop will check the start of the vma to be equal
to the locally saved 'tmp' variable and cause an incorrect failure
scenario. Fix the error by setting tmp to the end of the vma iterator
value before restarting the loop.
There is also a potential of the error code being overwritten when the
loop terminates early. Fix the return issue by directly returning when an
error is encountered since there is nothing to undo after the loop.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 37598f5a9d8b ("mlock: convert mlock to vma iterator")
Signed-off-by: Liam R. Howlett <[email protected]>
Reported-by: Ryan Roberts <[email protected]>
Link: https://lore.kernel.org/linux-mm/[email protected]/
Tested-by: Ryan Roberts <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions