summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-crypto-sha.c
diff options
context:
space:
mode:
authorBen Collins <ben.c@servergy.com>2015-04-03 18:09:46 +0200
committerMike Snitzer <snitzer@redhat.com>2015-04-15 18:10:26 +0200
commit0618764cb25f6fa9fb31152995de42a8a0496475 (patch)
tree16e5a37e6f584465d05c8df160a81e35609182a8 /drivers/crypto/ccp/ccp-crypto-sha.c
parentdm crypt: leverage immutable biovecs when decrypting on read (diff)
downloadlinux-0618764cb25f6fa9fb31152995de42a8a0496475.tar.xz
linux-0618764cb25f6fa9fb31152995de42a8a0496475.zip
dm crypt: fix deadlock when async crypto algorithm returns -EBUSY
I suspect this doesn't show up for most anyone because software algorithms typically don't have a sense of being too busy. However, when working with the Freescale CAAM driver it will return -EBUSY on occasion under heavy -- which resulted in dm-crypt deadlock. After checking the logic in some other drivers, the scheme for crypt_convert() and it's callback, kcryptd_async_done(), were not correctly laid out to properly handle -EBUSY or -EINPROGRESS. Fix this by using the completion for both -EBUSY and -EINPROGRESS. Now crypt_convert()'s use of completion is comparable to af_alg_wait_for_completion(). Similarly, kcryptd_async_done() follows the pattern used in af_alg_complete(). Before this fix dm-crypt would lockup within 1-2 minutes running with the CAAM driver. Fix was regression tested against software algorithms on PPC32 and x86_64, and things seem perfectly happy there as well. Signed-off-by: Ben Collins <ben.c@servergy.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto-sha.c')
0 files changed, 0 insertions, 0 deletions