mbox series

[0/3] Fixes for vma_merge() error path

Message ID 20230927160443.1927534-1-Liam.Howlett@oracle.com (mailing list archive)
Headers show
Series Fixes for vma_merge() error path | expand

Message

Liam R. Howlett Sept. 27, 2023, 4:04 p.m. UTC
Jann Horn reported a potential vma iterator issue in the failure path of
the vma_merge() code.  After examining the interface, it seemed the best
course of action is to simply add an undo path in the unlikely case of
an error.

On examining the vma iterator issue, another issue was discovered that
would increase the memory usage during failure scenarios, so this is
addressed in patch 2.

Since it is unclear in the code, another patch adds comments to the
vma_merge() function on why dup_anon_vma() is safe in 'case 6'.

Liam R. Howlett (3):
  mmap: Fix vma_iterator in error path of vma_merge()
  mmap: Fix error paths with dup_anon_vma()
  mmap: Add clarifying comment to vma_merge() code

 mm/mmap.c | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

Comments

Liam R. Howlett Sept. 27, 2023, 4:10 p.m. UTC | #1
* Liam R. Howlett <Liam.Howlett@oracle.com> [230927 12:04]:
...

git send-email aborted after the first email.  I've sent it again.

Sorry for the noise,
Liam