diff options
| author | Tom Lendacky <[email protected]> | 2018-07-03 12:11:33 -0500 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2018-07-13 18:26:48 +0800 |
| commit | f426d2b20f1cd63818873593031593e15c3db20b (patch) | |
| tree | 3aab62b69acd62c556f1fe7a6a79d60fdf969b9a /tools/perf/scripts/python | |
| parent | 5c324a2ffa06f8b6fda59a77c6807acb9f45cfee (diff) | |
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: 200664d5237f ("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]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions