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: Sat, 16 Dec 2023 00:24:23 -0600
From: Steve French <smfrench@...il.com>
To: Zizhi Wo <wozizhi@...wei.com>
Cc: stfrench@...rosoft.com, lsahlber@...hat.com, linux-cifs@...r.kernel.org, 
	samba-technical@...ts.samba.org, linux-kernel@...r.kernel.org, 
	yangerkun@...wei.com, Jeff Layton <jlayton@...nel.org>, 
	Christian Brauner <brauner@...nel.org>
Subject: Re: [PATCH -next] fs: cifs: Fix atime update check

added to cifs-2.6.git for-next (and added Cc: stable) pending additional testing

Adding @Christian Brauner  and @Jeff Layton  since this overlaps a
recent change of theirs.


On Tue, Dec 12, 2023 at 8:25 PM Zizhi Wo <wozizhi@...wei.com> wrote:
>
> Commit 9b9c5bea0b96 ("cifs: do not return atime less than mtime") indicates
> that in cifs, if atime is less than mtime, some apps will break.
> Therefore, it introduce a function to compare this two variables in two
> places where atime is updated. If atime is less than mtime, update it to
> mtime.
>
> However, the patch was handled incorrectly, resulting in atime and mtime
> being exactly equal. A previous commit 69738cfdfa70 ("fs: cifs: Fix atime
> update check vs mtime") fixed one place and forgot to fix another. Fix it.
>
> Fixes: 9b9c5bea0b96 ("cifs: do not return atime less than mtime")
> Signed-off-by: Zizhi Wo <wozizhi@...wei.com>
> ---
>  fs/smb/client/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
> index cf17e3dd703e..32a8525415d9 100644
> --- a/fs/smb/client/file.c
> +++ b/fs/smb/client/file.c
> @@ -4671,7 +4671,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
>         /* we do not want atime to be less than mtime, it broke some apps */
>         atime = inode_set_atime_to_ts(inode, current_time(inode));
>         mtime = inode_get_mtime(inode);
> -       if (timespec64_compare(&atime, &mtime))
> +       if (timespec64_compare(&atime, &mtime) < 0)
>                 inode_set_atime_to_ts(inode, inode_get_mtime(inode));
>
>         if (PAGE_SIZE > rc)
> --
> 2.39.2
>
>


--
Thanks,

Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ