Skip to content

Commit

Permalink
crypto: mv_cesa - ensure backlog is initialised
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Colin Ian King authored and herbertx committed Apr 21, 2015
1 parent 34c9a0f commit 1a92b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/mv_cesa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1a92b2b

Please sign in to comment.