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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOiN93=1BBvgUg3Zk9xC1WkBa87UDhR0C_=gsLOM1SSq9BhR0Q@mail.gmail.com>
Date:	Fri, 18 Apr 2014 13:20:14 +0530
From:	Ashish Sangwan <ashishsangwan2@...il.com>
To:	jon ernst <jonernst07@...il.com>
Cc:	"linux-ext4@...r.kernel.org List" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: fallocate_zero_range, check if is regular file

On Thu, Apr 17, 2014 at 9:52 AM, jon ernst <jonernst07@...il.com> wrote:
> fallocate_zero_range, check if inode is regular file.
>
> Signed-off-by: Jon Ernst <jonernst07@...il.com>
> ---
>  fs/ext4/extents.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 1bb3e4b..756a3b9 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4742,6 +4742,8 @@ static long ext4_zero_range(struct file *file,
> loff_t offset,
>
>     trace_ext4_zero_range(inode, offset, len, mode);
>
> +   if (!S_ISREG(inode->i_mode))
> +       return -EOPNOTSUPP;
IMO returning -EINVAL is better suited in this situation.
And the same error value has to be updated for collapse_range too. (as
mentioned by Michael in other mail thread regarding manpage patch of
collapse range)
>     /*
>      * Write out all dirty pages to avoid race conditions
>      * Then release them.
> --
> 1.8.1.2
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ