Skip to content

Commit cee8f4f

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
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 <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 3bffbe9 commit cee8f4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/cifs/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
165165
goto posix_open_ret;
166166
}
167167
} else {
168+
cifs_revalidate_mapping(*pinode);
168169
cifs_fattr_to_inode(*pinode, &fattr);
169170
}
170171

0 commit comments

Comments
 (0)