NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array
authorPetr Malat <oss@malat.biz>
Fri, 13 Mar 2020 20:24:43 +0000 (21:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2020 08:07:37 +0000 (09:07 +0100)
commitdbfc9e9878561da92cdcda41f321137c16966587
tree60644a25144983ead39c331f480f67d3682a0570
parent19c646f01e4ace1e5e5b3de2749de25bc86b79a1
NFS: Remove superfluous kmap in nfs_readdir_xdr_to_array

Array is mapped by nfs_readdir_get_array(), the further kmap is a result
of a bad merge and should be removed.

This resource leakage can be exploited for DoS by receptively reading
a content of a directory on NFS (e.g. by running ls).

Fixes: 67a56e9743171 ("NFS: Fix memory leaks and corruption in readdir")
Signed-off-by: Petr Malat <oss@malat.biz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/dir.c