summaryrefslogtreecommitdiff
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorBen Collins <ben.c@servergy.com>2015-04-03 16:09:46 +0000
committerMike Snitzer <snitzer@redhat.com>2015-04-15 12:10:26 -0400
commit0618764cb25f6fa9fb31152995de42a8a0496475 (patch)
tree16e5a37e6f584465d05c8df160a81e35609182a8 /block/blk-cgroup.h
parent5977907937afa2b5584a874d44ba6c0f56aeaa9c (diff)
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 'block/blk-cgroup.h')
0 files changed, 0 insertions, 0 deletions