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] [day] [month] [year] [list]
Date:	Mon, 28 Mar 2016 17:53:13 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	chengang@...ndsoft.com.cn
Cc:	akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
	jmarchan@...hat.com, vbabka@...e.cz, willy@...ux.intel.com,
	dan.j.williams@...el.co, dan.j.williams@...el.com,
	mgorman@...hsingularity.net, trivial@...nel.org,
	linux-kernel@...r.kernel.org, Chen Gang <gang.chen.5i5j@...il.com>
Subject: Re: [PATCH trivial] include/linux/huge_mm.h: Return NULL instead of
 false for pmd_trans_huge_lock()

On Mon, Mar 28, 2016 at 10:49:54PM +0800, chengang@...ndsoft.com.cn wrote:
> From: Chen Gang <chengang@...ndsoft.com.cn>
> 
> The return value of pmd_trans_huge_lock() is a pointer, not a boolean
> value, so use NULL instead of false as the return value.
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@...il.com>

Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>

> ---
>  include/linux/huge_mm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 79b0ef6..7008623 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -127,7 +127,7 @@ static inline spinlock_t *pmd_trans_huge_lock(pmd_t *pmd,
>  	if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd))
>  		return __pmd_trans_huge_lock(pmd, vma);
>  	else
> -		return false;
> +		return NULL;
>  }
>  static inline int hpage_nr_pages(struct page *page)
>  {
> -- 
> 1.9.3
> 

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists