Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: remove unneeded check in decode_devicenotify_args()

[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>

authored by

Alexey Khoroshilov and committed by
Trond Myklebust
cb8fac6d 612896ec

-4
-4
fs/nfs/callback_xdr.c
··· 271 271 n = ntohl(*p++); 272 272 if (n == 0) 273 273 goto out; 274 - if (n > ULONG_MAX / sizeof(*args->devs)) { 275 - status = htonl(NFS4ERR_BADXDR); 276 - goto out; 277 - } 278 274 279 275 args->devs = kmalloc_array(n, sizeof(*args->devs), GFP_KERNEL); 280 276 if (!args->devs) {