]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: revalidate mapping when we open files for SMB1 POSIX
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 25 Mar 2021 06:26:35 +0000 (16:26 +1000)
committerSteve French <stfrench@microsoft.com>
Fri, 26 Mar 2021 23:04:58 +0000 (18:04 -0500)
commit79285bd05099bada4a821e1b88d7e3ad0d5d31dc
tree08a3cf1c4a84f3b289b34c8212d7fb10f25d418d
parentdbd55694074a4fdbc8a6ec70bfbaad74cb4f08c8
cifs: revalidate mapping when we open files for SMB1 POSIX

RHBZ: 1933527

Under SMB1 + POSIX, if an inode is reused on a server after we have read and
cached a part of a file, when we then open the new file with the
re-cycled inode there is a chance that we may serve the old data out of cache
to the application.
This only happens for SMB1 (deprecated) and when posix are used.
The simplest solution to avoid this race is to force a revalidate
on smb1-posix open.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/file.c