cifs: fix workstation_name for multiuser mounts
authorRyan Bair <ryandbair@gmail.com>
Wed, 22 Dec 2021 16:04:05 +0000 (11:04 -0500)
committerSteve French <stfrench@microsoft.com>
Thu, 10 Feb 2022 02:14:48 +0000 (20:14 -0600)
commite24f993751e63c52bf26453f92a896263a0bbc46
tree5de6d6b4cd5ea1fdca6e365ced574fe8e96fb0af
parenta87ffbee0cca10e5190176b58c810936c1b8d899
cifs: fix workstation_name for multiuser mounts

Set workstation_name from the master_tcon for multiuser mounts.

Just in case, protect size_of_ntlmssp_blob against a NULL workstation_name.

Fixes: 49bd49f983b5 ("cifs: send workstation name during ntlmssp session setup")
Cc: stable@vger.kernel.org # 5.16
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Ryan Bair <ryandbair@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/sess.c