lkml.org 
[lkml]   [2022]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mm: madvise: return correct bytes advised with process_madvise
From

Thanks Minchan for your comment!!
On 3/9/2022 10:17 PM, Minchan Kim wrote:
>> @@ -1426,15 +1426,21 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec,
>>
>> while (iov_iter_count(&iter)) {
>> iovec = iov_iter_iovec(&iter);
>> + /*
>> + * Even when [start, end) passed to do_madvise covers
>> + * some unmapped addresses, it continues processing with
>> + * returning ENOMEM at the end. Thus consider the range
>> + * as processed when do_madvise() returns ENOMEM.
>> + * This makes process_madvise() never returns ENOMEM.
>> + */
> Looks like that this patch has two things. first, returns processed
> bytes instead of error in case of error. Second, keep working on
> rest vmas on -ENOMEM due to unmapped hole.
>
> First thing totally makes sense to me(that's exactly I wanted to
> do but somehow missed) so it should go stable tree. However,
> second stuff might be arguble so it would be great if you split
> the patch.

Sure, then will split the patch in V2.

>

\
 
 \ /
  Last update: 2022-03-10 09:26    [W:0.130 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site