summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-dev.h
diff options
context:
space:
mode:
authorHook, Gary <Gary.Hook@amd.com>2019-06-27 16:16:23 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-03 22:13:12 +0800
commit52393d617af7b554f03531e6756facf2ea687d2e (patch)
tree56a98bb9cd2c002ffaecbf2ff702f3d3fbd2a430 /drivers/crypto/ccp/ccp-dev.h
parentae400be94b84206e8344e8f10d896aeb3ea2f505 (diff)
downloadlinux-52393d617af7b554f03531e6756facf2ea687d2e.tar.bz2
crypto: ccp - Validate the the error value used to index error messages
The error code read from the queue status register is only 6 bits wide, but we need to verify its value is within range before indexing the error messages. Fixes: 81422badb3907 ("crypto: ccp - Make syslog errors human-readable") Cc: <stable@vger.kernel.org> Reported-by: Cfir Cohen <cfir@google.com> Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev.h')
-rw-r--r--drivers/crypto/ccp/ccp-dev.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 6810b65c1939..7442b0422f8a 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b/drivers/crypto/ccp/ccp-dev.h
@@ -632,7 +632,7 @@ struct ccp5_desc {
void ccp_add_device(struct ccp_device *ccp);
void ccp_del_device(struct ccp_device *ccp);
-extern void ccp_log_error(struct ccp_device *, int);
+extern void ccp_log_error(struct ccp_device *, unsigned int);
struct ccp_device *ccp_alloc_struct(struct sp_device *sp);
bool ccp_queues_suspended(struct ccp_device *ccp);