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]
Message-ID: <alpine.LFD.2.00.1406251030500.2171@localhost.localdomain>
Date:	Wed, 25 Jun 2014 10:31:42 +0200 (CEST)
From:	Lukáš Czerner <lczerner@...hat.com>
To:	Eric Biggers <ebiggers3@...il.com>
cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: fix check for fallocate on active swapfile

On Tue, 24 Jun 2014, Eric Biggers wrote:

> Date: Tue, 24 Jun 2014 23:45:08 -0500
> From: Eric Biggers <ebiggers3@...il.com>
> To: linux-fsdevel@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org, Eric Biggers <ebiggers3@...il.com>
> Subject: [PATCH] vfs: fix check for fallocate on active swapfile
> 
> Fix the broken check for calling sys_fallocate() on an active swapfile,
> introduced by commit 0790b31b69374ddadefe ("fs: disallow all fallocate
> operation on active swapfile").

Oops, good catch, Thanks!

Reviewed-by: Lukas Czerner <lczerner@...hat.com>

> 
> Signed-off-by: Eric Biggers <ebiggers3@...il.com>
> ---
>  fs/open.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/open.c b/fs/open.c
> index 36662d0..d6fd3ac 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -263,11 +263,10 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
>  		return -EPERM;
>  
>  	/*
> -	 * We can not allow to do any fallocate operation on an active
> -	 * swapfile
> +	 * We cannot allow any fallocate operation on an active swapfile
>  	 */
>  	if (IS_SWAPFILE(inode))
> -		ret = -ETXTBSY;
> +		return -ETXTBSY;
>  
>  	/*
>  	 * Revalidate the write permissions, in case security policy has
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ