[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200615232751.GA22366@embeddedor>
Date: Mon, 15 Jun 2020 18:27:51 -0500
From: "Gustavo A. R. Silva" <gustavoars@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Kees Cook <keescook@...omium.org>
Subject: [PATCH][next] afs: Use array3_size() helper in afs_extract_to_buf()
Use array3_size() helper instead of the open-coded version in
afs_extract_to_buf(). These sorts of multiplication factors need
to be wrapped in array3_size().
This issue was found with the help of Coccinelle and, audited and fixed
manually.
Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
---
fs/afs/cmservice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index bef413818af7..4d086f9c829e 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -268,7 +268,7 @@ static int afs_deliver_cb_callback(struct afs_call *call)
GFP_KERNEL);
if (!call->buffer)
return -ENOMEM;
- afs_extract_to_buf(call, call->count * 3 * 4);
+ afs_extract_to_buf(call, array3_size(call->count, 3, 4));
call->unmarshall++;
/* Fall through */
--
2.27.0
Powered by blists - more mailing lists