diff options
author | Steve French <stfrench@microsoft.com> | 2024-05-14 01:02:05 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-05-14 01:02:05 +0300 |
commit | 14b1cd25346b1d615616a9c2dfdad9b4e6581e0d (patch) | |
tree | 509f7d1f8107d435be4e1991f63c3bec152c8c2b /fs/smb/client/cifsglob.h | |
parent | 29b4c7bb8565118e2c7e08709fce0dbe8bf61011 (diff) | |
download | linux-14b1cd25346b1d615616a9c2dfdad9b4e6581e0d.tar.xz |
cifs: Fix locking in cifs_strict_readv()
Fix to take the i_rwsem (through the netfs locking wrappers) before taking
cinode->lock_sem.
Fixes: 3ee1a1fc3981 ("cifs: Cut over to using netfslib")
Reported-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r-- | fs/smb/client/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 65574e69ba4f..73482734a8d8 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -1995,6 +1995,7 @@ require use of the stronger protocol */ * ->chans_need_reconnect * ->chans_in_reconnect * cifs_tcon->tc_lock (anything that is not protected by another lock and can change) + * inode->i_rwsem, taken by fs/netfs/locking.c e.g. should be taken before cifsInodeInfo locks * cifsInodeInfo->open_file_lock cifsInodeInfo->openFileList cifs_alloc_inode * cifsInodeInfo->writers_lock cifsInodeInfo->writers cifsInodeInfo_alloc * cifsInodeInfo->lock_sem cifsInodeInfo->llist cifs_init_once |