cifs: fix uninitialised lease_key in open_shroot()
authorPaulo Alcantara <pc@cjr.nz>
Tue, 21 Apr 2020 02:44:24 +0000 (23:44 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Apr 2020 01:29:11 +0000 (20:29 -0500)
commit0fe0781f29dd8ab618999e6bda33c782ebbdb109
tree6466c4c7d089eb0a93bf4630c726358f44ad01e6
parent3786f4bddc7b8c6e90cbf5f52c2443a8d8e1dede
cifs: fix uninitialised lease_key in open_shroot()

SMB2_open_init() expects a pre-initialised lease_key when opening a
file with a lease, so set pfid->lease_key prior to calling it in
open_shroot().

This issue was observed when performing some DFS failover tests and
the lease key was never randomly generated.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c