Skip to content

Commit

Permalink
crypto: drbg - Initialise mutex in drbg_healthcheck_sanity
Browse files Browse the repository at this point in the history
As we moved the mutex init out of drbg_instantiate and into cra_init
we need to explicitly initialise the mutex in drbg_healthcheck_sanity.

Signed-off-by: Herbert Xu <[email protected]>
Acked-by: Stephan Mueller <[email protected]>
  • Loading branch information
herbertx committed Apr 21, 2015
1 parent fa3ae62 commit e11a754
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,8 @@ static inline int __init drbg_healthcheck_sanity(void)
if (!drbg)
return -ENOMEM;

mutex_init(&drbg->drbg_mutex);

/*
* if the following tests fail, it is likely that there is a buffer
* overflow as buf is much smaller than the requested or provided
Expand Down

0 comments on commit e11a754

Please sign in to comment.