lkml.org 
[lkml]   [2018]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] vmalloc: add vm_flags argument to internal __vmalloc_node()
From
Date


On 02/21/2018 03:24 PM, Matthew Wilcox wrote:
> On Tue, Jan 23, 2018 at 01:55:22PM +0300, Konstantin Khlebnikov wrote:
>> This allows to set VM_USERMAP in vmalloc_user() and vmalloc_32_user()
>> directly at allocation and avoid find_vm_area() call.
>
> While reviewing this patch, I came across this infelicity ...
>
> have I understood correctly?
>
> diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c
> index e13d911251e7..9060f80b4a41 100644
> --- a/mm/kasan/kasan.c
> +++ b/mm/kasan/kasan.c
> @@ -631,11 +631,10 @@ int kasan_module_alloc(void *addr, size_t size)
> ret = __vmalloc_node_range(shadow_size, 1, shadow_start,
> shadow_start + shadow_size,
> GFP_KERNEL | __GFP_ZERO,
> - PAGE_KERNEL, VM_NO_GUARD, NUMA_NO_NODE,
> + PAGE_KERNEL, VM_NO_GUARD | VM_KASAN, NUMA_NO_NODE,
> __builtin_return_address(0));
>
> if (ret) {
> - find_vm_area(addr)->flags |= VM_KASAN;

addr != ret
That's different vm areas.

> kmemleak_ignore(ret);
> return 0;
> }
>

\
 
 \ /
  Last update: 2018-02-21 13:39    [W:0.112 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site