提交 a7dfa2e2 编写于 作者: A Alexey Khoroshilov 提交者: Yongqiang Liu

NFS: remove unneeded check in decode_devicenotify_args()

stable inclusion
from stable-4.19.238
commit 97cc035bdfe754dbfbc2c9b04bc46bc71ef5bc93
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5A6BA
CVE: NA

--------------------------------

[ Upstream commit cb8fac6d ]

[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: NAlexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: a4f743a6 ("NFSv4.1: Convert open-coded array allocation calls to kmalloc_array()")
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 b562a611
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册