OSDN Git Service

fs/nfs: Fix nfs_parse_devname to not modify it's argument
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 30 Jan 2019 13:58:38 +0000 (07:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:26 +0000 (14:50 +0100)
commiteb07716493d72f6547a80fd68e8cf3f51ee60a03
tree3547625868d076d1c599af4926682cf8ff6b815e
parent0f239ea02939c42e9f6f2c3ef11f329b8661fcb2
fs/nfs: Fix nfs_parse_devname to not modify it's argument

[ Upstream commit 40cc394be1aa18848b8757e03bd8ed23281f572e ]

In the rare and unsupported case of a hostname list nfs_parse_devname
will modify dev_name.  There is no need to modify dev_name as the all
that is being computed is the length of the hostname, so the computed
length can just be shorted.

Fixes: dc04589827f7 ("NFS: Use common device name parsing logic for NFSv4 and NFSv2/v3")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/super.c