diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2017-07-07 13:57:06 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:36 (GMT) |
commit | 60944651e4f7c6d2cd435f88dce8707cbc772d91 (patch) | |
tree | 7583deb1a0e803531f43c9d4a9d5f365caf8a454 /crypto | |
parent | 40c0ca3f08f9f6c6e78bd8fecae403e28f26d08b (diff) | |
download | linux-60944651e4f7c6d2cd435f88dce8707cbc772d91.tar.xz |
crypto: caam - fix signals handling
Driver does not properly handle the case when signals interrupt
wait_for_completion_interruptible():
-it does not check for return value
-completion structure is allocated on stack; in case a signal interrupts
the sleep, it will go out of scope, causing the worker thread
(caam_jr_dequeue) to fail when it accesses it
wait_for_completion_interruptible() is replaced with uninterruptable
wait_for_completion().
We choose to block all signals while waiting for I/O (device executing
the split key generation job descriptor) since the alternative - in
order to have a deterministic device state - would be to flush the job
ring (aborting *all* in-progress jobs).
Cc: <stable@vger.kernel.org>
Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
Fixes: 4c1ec1f930154 ("crypto: caam - refactor key_gen, sg")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 7459e1d25ffefa2b1be799477fcc1f6c62f6cec7)
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions