cifs: prevent NULL deref in cifs_compose_mount_options()
authorPaulo Alcantara <pc@cjr.nz>
Fri, 2 Jul 2021 14:50:54 +0000 (11:50 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:36:17 +0000 (14:36 +0200)
commite58c162789becede894d3e94c0ce6695a2ef5796
tree219c60cbc01179e001fd0ff285b32415f37aedf4
parentfaa3e7da487abbde93cd6f04f84f82717cc1077b
cifs: prevent NULL deref in cifs_compose_mount_options()

[ Upstream commit 03313d1c3a2f086bb60920607ab79ac8f8578306 ]

The optional @ref parameter might contain an NULL node_name, so
prevent dereferencing it in cifs_compose_mount_options().

Addresses-Coverity: 1476408 ("Explicit null dereferenced")
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifs_dfs_ref.c