Re: [PATCH] mm: as the same logic with queue_pages_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 06, 2023 at 02:19:02PM +0800, Edward AD wrote:
> Only dealwith queue_pages_range locked vmas.

What?

> Signed-off-by: Edward AD <eadavis@xxxxxxxx>
> ---
>  mm/mempolicy.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index 42b5567e3773..13050b968479 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -1342,6 +1342,8 @@ static long do_mbind(unsigned long start, unsigned long len,
>  	vma_iter_init(&vmi, mm, start);
>  	prev = vma_prev(&vmi);
>  	for_each_vma_range(vmi, vma, end) {
> +		if (!vma || start < vma->vm_start)
> +			continue;

#define for_each_vma_range(__vmi, __vma, __end)                         \
        while (((__vma) = vma_find(&(__vmi), (__end))) != NULL)

How can this produce a vma that is either NULL or has a vm_start after start?





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux