Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f2f02d1 authored by Gilad Ben-Yossef's avatar Gilad Ben-Yossef Committed by Greg Kroah-Hartman
Browse files

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: abefd674 ("staging: ccree: introduce CryptoCell HW driver").

Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d255b343
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -382,7 +382,8 @@ int send_request(
		/* Wait upon sequence completion.
		 *  Return "0" -Operation done successfully.
		 */
		return wait_for_completion_interruptible(&ssi_req->seq_compl);
		wait_for_completion(&ssi_req->seq_compl);
		return 0;
	} else {
		/* Operation still in process */
		return -EINPROGRESS;