Files
linux/drivers
Tom Lendacky 3dcf894690 crypto: ccp - Fix command completion detection race
commit f426d2b20f upstream.

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: 200664d523 ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support")
Cc: <stable@vger.kernel.org> # 4.16.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-17 21:02:43 +02:00
..
2018-08-03 07:47:52 +02:00
2018-07-22 15:15:58 +02:00
2018-07-03 11:26:59 +02:00
2018-03-27 09:51:22 +02:00
2018-08-09 12:15:12 +02:00
2018-05-22 13:48:34 -04:00
2018-04-18 23:37:25 -04:00
2018-07-25 11:26:11 +02:00
2018-03-29 13:38:10 +03:00