From: Gilad Ben-Yossef Date: Sun, 25 Jun 2017 07:47:24 +0000 (+0300) Subject: staging: ccree: use signal safe completion wait X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f2f02d1b57220951b9ae69abbcaa403163ee41b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging/ccree/ssi_request_mgr.c index 7c2d88a8fe60..2c6937af995d 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;