Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672630
| From | Gilad Ben-Yossef <gilad@benyossef.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 7/7] staging: ccree: use signal safe completion wait |
| Date | 2017-06-22 15:40 +0200 |
| Message-ID | <tVav0-5lU-15@gated-at.bofh.it> (permalink) |
| References | <tVauZ-5lU-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 cffc8de..87f5ab6 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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] staging: ccree: bug fixes and TODO items for 4.13 Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
[PATCH v2 7/7] staging: ccree: use signal safe completion wait Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
[PATCH v2 4/7] staging: ccree: remove unused function Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
[PATCH v2 6/7] staging: ccree: add DT bus coherency detection Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
[PATCH v2 5/7] staging: ccree: add clock management support Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
Re: [PATCH v2 5/7] staging: ccree: add clock management support Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-23 22:30 +0200
[PATCH v2 2/7] staging: ccree: register setkey for none hash macs Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
Re: [PATCH v2 2/7] staging: ccree: register setkey for none hash macs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-23 22:30 +0200
Re: [PATCH v2 2/7] staging: ccree: register setkey for none hash macs Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-25 08:30 +0200
[PATCH v2 1/7] staging: ccree: fix hash import/export Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-22 15:40 +0200
Re: [PATCH v2 1/7] staging: ccree: fix hash import/export Dan Carpenter <dan.carpenter@oracle.com> - 2017-06-22 16:00 +0200
Re: [PATCH v2 1/7] staging: ccree: fix hash import/export Gilad Ben-Yossef <gilad@benyossef.com> - 2017-06-25 08:30 +0200
Re: [PATCH v2 3/7] staging: ccree: add support for older HW revisions Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-23 22:30 +0200
csiph-web