diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2016-11-04 19:50:31 +0100 |
---|---|---|
committer | Pavel Shilovsky <pshilov@microsoft.com> | 2016-12-05 21:08:33 +0100 |
commit | 53e0e11efe9289535b060a51d4cf37c25e0d0f2b (patch) | |
tree | 46d7d80876843d554ffc9ca45ef74a2ba0233dc7 /fs/cifs/smb2proto.h | |
parent | CIFS: Fix a possible memory corruption in push locks (diff) | |
download | linux-53e0e11efe9289535b060a51d4cf37c25e0d0f2b.tar.xz linux-53e0e11efe9289535b060a51d4cf37c25e0d0f2b.zip |
CIFS: Fix a possible memory corruption during reconnect
We can not unlock/lock cifs_tcp_ses_lock while walking through ses
and tcon lists because it can corrupt list iterator pointers and
a tcon structure can be released if we don't hold an extra reference.
Fix it by moving a reconnect process to a separate delayed work
and acquiring a reference to every tcon that needs to be reconnected.
Also do not send an echo request on newly established connections.
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2proto.h')
-rw-r--r-- | fs/cifs/smb2proto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smb2proto.h b/fs/cifs/smb2proto.h index eb2cde2f64ba..f2d511a6971b 100644 --- a/fs/cifs/smb2proto.h +++ b/fs/cifs/smb2proto.h @@ -96,6 +96,7 @@ extern int smb2_open_file(const unsigned int xid, extern int smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, const unsigned int xid); extern int smb2_push_mandatory_locks(struct cifsFileInfo *cfile); +extern void smb2_reconnect_server(struct work_struct *work); /* * SMB2 Worker functions - most of protocol specific implementation details |