mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
fs/nfs: Fix nfs_parse_devname to not modify it's argument
[ Upstream commit40cc394be1] 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:dc04589827("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b7ac39a1f6
commit
020fa8dc3a
@@ -1928,7 +1928,7 @@ static int nfs_parse_devname(const char *dev_name,
|
||||
/* kill possible hostname list: not supported */
|
||||
comma = strchr(dev_name, ',');
|
||||
if (comma != NULL && comma < end)
|
||||
*comma = 0;
|
||||
len = comma - dev_name;
|
||||
}
|
||||
|
||||
if (len > maxnamlen)
|
||||
|
||||
Reference in New Issue
Block a user