lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161220143554.GJ3769@dhcp22.suse.cz>
Date:   Tue, 20 Dec 2016 15:35:54 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Geliang Tang <geliangtang@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        zijun_hu <zijun_hu@....com>,
        David Rientjes <rientjes@...gle.com>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Chris Wilson <chris@...is-wilson.co.uk>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vmalloc.c: use rb_entry_safe

On Tue 20-12-16 21:57:43, Geliang Tang wrote:
> Use rb_entry_safe() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@...il.com>

Acked-by: Michal Hocko <mhocko@...e.com>

> ---
>  mm/vmalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index a558438..b9999fc 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2309,7 +2309,7 @@ EXPORT_SYMBOL_GPL(free_vm_area);
>  #ifdef CONFIG_SMP
>  static struct vmap_area *node_to_va(struct rb_node *n)
>  {
> -	return n ? rb_entry(n, struct vmap_area, rb_node) : NULL;
> +	return rb_entry_safe(n, struct vmap_area, rb_node);
>  }
>  
>  /**
> -- 
> 2.9.3
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ