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]
Date:   Sun, 1 Dec 2019 12:23:18 -0600
From:   Steve French <smfrench@...il.com>
To:     Deepa Dinamani <deepa.kernel@...il.com>
Cc:     Al Viro <viro@...iv.linux.org.uk>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Steve French <stfrench@...rosoft.com>,
        CIFS <linux-cifs@...r.kernel.org>
Subject: Re: [PATCH 2/7] fs: cifs: Fix atime update check vs mtime

merged into cifs-2.6.git for-next

On Fri, Nov 29, 2019 at 11:34 PM Deepa Dinamani <deepa.kernel@...il.com> wrote:
>
> According to the comment in the code and commit log, some apps
> expect atime >= mtime; but the introduced code results in
> atime==mtime.  Fix the comparison to guard against atime<mtime.
>
> Fixes: 9b9c5bea0b96 ("cifs: do not return atime less than mtime")
> Signed-off-by: Deepa Dinamani <deepa.kernel@...il.com>
> Cc: stfrench@...rosoft.com
> Cc: linux-cifs@...r.kernel.org
> ---
>  fs/cifs/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 8a76195e8a69..ca76a9287456 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -163,7 +163,7 @@ cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr)
>
>         spin_lock(&inode->i_lock);
>         /* we do not want atime to be less than mtime, it broke some apps */
> -       if (timespec64_compare(&fattr->cf_atime, &fattr->cf_mtime))
> +       if (timespec64_compare(&fattr->cf_atime, &fattr->cf_mtime) < 0)
>                 inode->i_atime = fattr->cf_mtime;
>         else
>                 inode->i_atime = fattr->cf_atime;
> --
> 2.17.1
>


-- 
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ