mirror of https://gitee.com/openkylin/linux.git
staging: ccree: use signal safe completion wait
We were waiting for a completion notification of HW DMA
operation using an interruptible wait which can result
in data corruption if a signal interrupted us while
DMA was not yet completed.
Fix this by moving to uninterrupted wait.
Fixes: abefd6741d
("staging: ccree: introduce CryptoCell HW driver").
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d255b343f5
commit
0f2f02d1b5
|
@ -382,7 +382,8 @@ int send_request(
|
||||||
/* Wait upon sequence completion.
|
/* Wait upon sequence completion.
|
||||||
* Return "0" -Operation done successfully.
|
* Return "0" -Operation done successfully.
|
||||||
*/
|
*/
|
||||||
return wait_for_completion_interruptible(&ssi_req->seq_compl);
|
wait_for_completion(&ssi_req->seq_compl);
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
/* Operation still in process */
|
/* Operation still in process */
|
||||||
return -EINPROGRESS;
|
return -EINPROGRESS;
|
||||||
|
|
Loading…
Reference in New Issue