diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2022-02-15 13:17:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 15:23:48 +0300 |
commit | 75ee75cc360a8ce0ba3a3e796658152f9b3c4694 (patch) | |
tree | 464d7d1e76ea7b7f1d929d800e2d039b42f0c1b2 /fs | |
parent | 8bddc0227e78edea1da2da357d1e184ccd2c25e8 (diff) | |
download | linux-75ee75cc360a8ce0ba3a3e796658152f9b3c4694.tar.xz |
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')
-rw-r--r-- | fs/nfs/callback_xdr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index ce3d1d5b1291..ea17085ef884 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -271,10 +271,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) { |