]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ccree: break send_request and fix ret val
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 7 Jan 2018 12:14:20 +0000 (12:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:27:22 +0000 (16:27 +0100)
commitfa1deb13807ba0c1a86046bedc972dc0e16f1960
treeec8ade888d5dced9e697f1e7f02b1b4530abc84e
parentd5d6e087b05054193a3640d0e62f8830e6ba97dc
staging: ccree: break send_request and fix ret val

The send_request() function was handling both synchronous
and asynchronous invocations, but were not handling
the asynchronous case, which may be called in an atomic
context, properly as it was sleeping.

Start to fix the problem by breaking up the two use
cases to separate functions calling a common internal
service function and return error instead of sleeping
for the asynchronous case.

The next patch will complete the fix by implementing
proper backlog handling.

Fixes: b47cbd53c7 ("staging: ccree: introduce CryptoCell HW driver").
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_aead.c
drivers/staging/ccree/ssi_cipher.c
drivers/staging/ccree/ssi_hash.c
drivers/staging/ccree/ssi_request_mgr.c
drivers/staging/ccree/ssi_request_mgr.h