Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674186 > unrolled thread

[PATCH v3 6/6] staging: ccree: use signal safe completion wait

Started byGilad Ben-Yossef <gilad@benyossef.com>
First post2017-06-25 09:50 +0200
Last post2017-06-25 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 6/6] staging: ccree: use signal safe completion wait Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-25 09:50 +0200

#1674186 — [PATCH v3 6/6] staging: ccree: use signal safe completion wait

FromGilad Ben-Yossef <gilad@benyossef.com>
Date2017-06-25 09:50 +0200
Subject[PATCH v3 6/6] staging: ccree: use signal safe completion wait
Message-ID<tWasV-2gj-9@gated-at.bofh.it>
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>
---
 drivers/staging/ccree/ssi_request_mgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c
index 7c2d88a..2c6937a 100644
--- a/drivers/staging/ccree/ssi_request_mgr.c
+++ b/drivers/staging/ccree/ssi_request_mgr.c
@@ -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;
-- 
2.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web