Skip to content

mm: madvise: return exact bytes advised with process_madvise under error

Charan Teja Kalla linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Revert "mm: madvise: skip unmapped vma holes passed to process_madvise"mm/madvise.c+1 -82 replies
2/2mm: madvise: return exact bytes advised with process_madvise under errormm/madvise.c+87 -35 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMichal Hocko
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm: madvise: return exact bytes advised with process_madvise under error

Under error conditions, process_madvise() is not returning the exact bytes processed in a iovec element thus user may repeat the advise on vma ranges contained in the iovec element despite those ranges are already processed. This problem is partially solved with commit 08095d6310a7 ("mm: madvise: skip unmapped vma holes passed to process_madvise") for ENOMEM return types. These patches try to solve the problem for other error return types.

Starting this as new discussion, as the back ground for these changes
are coming from below patches, which are already merged into linus tree:
1) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5bd009c7c9a9e888077c07535dc0c70aeab242c3
2) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=08095d6310a7ce43256b4251577bc66a25c6e1a6

and lore archives for the above changes:
1) V2: https://lore.kernel.org/linux-mm/[email protected]/
2) V1: https://lore.kernel.org/linux-mm/[email protected]/

Charan Teja Kalla (1):
Revert "mm: madvise: skip unmapped vma holes passed to
process_madvise"

Charan Teja Reddy (1):
mm: madvise: return exact bytes advised with process_madvise under
error

 mm/madvise.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 88 insertions(+), 11 deletions(-)
Signature · 1 line
2.7.4