Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: ccp - Fix command completion detection race
The wait_event() function is used to detect command completion. The interrupt handler will set the wait condition variable when the interrupt is triggered. However, the variable used for wait_event() is initialized after the command has been submitted, which can create a race condition with the interrupt handler and result in the wait_event() never returning. Move the initialization of the wait condition variable to just before command submission. Fixes: 200664d ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") Cc: <[email protected]> # 4.16.x- Signed-off-by: Tom Lendacky <[email protected]> Reviewed-by: Brijesh Singh <[email protected]> Acked-by: Gary R Hook <[email protected]> Acked-by: Gary R Hook <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
- Loading branch information