Re: [PATCH v2 4/9] kasan: simplify address description logic

From: Andrey Ryabinin
Date: Fri Mar 03 2017 - 09:11:25 EST




On 03/02/2017 04:48 PM, Andrey Konovalov wrote:

> -static void kasan_object_err(struct kmem_cache *cache, void *object)
> +static struct page *addr_to_page(const void *addr)
> +{
> + if ((addr >= (void *)PAGE_OFFSET) &&
> + (addr < high_memory))

Should fit in one line.

> + return virt_to_head_page(addr);
> + return NULL;
> +}
> +