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, 30 May 2016 07:13:20 +0200
From:	Sebastian Reichel <sre@...nel.org>
To:	Muhammad Falak R Wani <falakreyaz@...il.com>
Cc:	Oleg Nesterov <oleg@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] HSI: cmt_speech: use vma_pages().

Hi,

On Sat, May 21, 2016 at 06:49:21PM +0530, Muhammad Falak R Wani wrote:
> Replace explicit computation of vma page count by a call to
> vma_pages()
> 
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
> ---
>  drivers/hsi/clients/cmt_speech.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c
> index 95638df..b16cfa4 100644
> --- a/drivers/hsi/clients/cmt_speech.c
> +++ b/drivers/hsi/clients/cmt_speech.c
> @@ -1275,7 +1275,7 @@ static int cs_char_mmap(struct file *file, struct vm_area_struct *vma)
>  	if (vma->vm_end < vma->vm_start)
>  		return -EINVAL;
>  
> -	if (((vma->vm_end - vma->vm_start) >> PAGE_SHIFT) != 1)
> +	if (vma_pages(vma) != 1)
>  		return -EINVAL;
>  
>  	vma->vm_flags |= VM_IO | VM_DONTDUMP | VM_DONTEXPAND;

Thanks, queued for 4.8.

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ