diff options
author | Colin Ian King <colin.king@canonical.com> | 2015-04-14 16:51:29 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-21 01:14:38 (GMT) |
commit | 1a92b2ba339221a4afee43adf125fcc9a41353f7 (patch) | |
tree | f85773bd08746f10b9ffbf429b5f6fad8640c6cc | |
parent | 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085 (diff) | |
download | linux-1a92b2ba339221a4afee43adf125fcc9a41353f7.tar.xz |
crypto: mv_cesa - ensure backlog is initialised
backlog is not initialised so in the case where
cpg->eng_st != ENGINE_IDLE it is never initialised and
hence which could lead to an illegal memory dereference
in the statement:
backlog->complete(backlog, -EINPROGRESS);
Discovered with cppcheck static analsys:
[drivers/crypto/mv_cesa.c:616]:
(error) Uninitialized variable: backlog
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/mv_cesa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index f91f15d..e63efbd 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c @@ -595,7 +595,7 @@ static int queue_manag(void *data) cpg->eng_st = ENGINE_IDLE; do { struct crypto_async_request *async_req = NULL; - struct crypto_async_request *backlog; + struct crypto_async_request *backlog = NULL; __set_current_state(TASK_INTERRUPTIBLE); |