summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2022-02-15 13:17:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-15 14:14:52 +0200
commit97cc035bdfe754dbfbc2c9b04bc46bc71ef5bc93 (patch)
tree79f08f7b324b7031de773379724b569fa1db1e5c /fs/nfs
parent8a2225369d605bb4b6bc3a7ff668a2ea47e1e027 (diff)
downloadlinux-stable-97cc035bdfe754dbfbc2c9b04bc46bc71ef5bc93.tar.gz
linux-stable-97cc035bdfe754dbfbc2c9b04bc46bc71ef5bc93.tar.bz2
linux-stable-97cc035bdfe754dbfbc2c9b04bc46bc71ef5bc93.zip
NFS: remove unneeded check in decode_devicenotify_args()
[ Upstream commit cb8fac6d2727f79f211e745b16c9abbf4d8be652 ] [You don't often get email from khoroshilov@ispras.ru. Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.] Overflow check in not needed anymore after we switch to kmalloc_array(). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Fixes: a4f743a6bb20 ("NFSv4.1: Convert open-coded array allocation calls to kmalloc_array()") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback_xdr.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 76aa1b456c52..2f84c612838c 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -281,10 +281,6 @@ __be32 decode_devicenotify_args(struct svc_rqst *rqstp,
n = ntohl(*p++);
if (n == 0)
goto out;
- if (n > ULONG_MAX / sizeof(*args->devs)) {
- status = htonl(NFS4ERR_BADXDR);
- goto out;
- }
args->devs = kmalloc_array(n, sizeof(*args->devs), GFP_KERNEL);
if (!args->devs) {