diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-11-15 10:34:22 (GMT) |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-11-15 10:34:22 (GMT) |
commit | da63d20bfb12827dd7747a841ea27348af3abc0a (patch) | |
tree | ba275a74d068f91b453c08b9bacf8afe9577db9b /crypto/cryptd.c | |
parent | 55020c8056a83ef2181e4cddd39cb2b9f4b88c5a (diff) | |
parent | 77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff) | |
download | linux-da63d20bfb12827dd7747a841ea27348af3abc0a.tar.xz |
Merge tag 'v3.7-rc5' into devicetree/next
Linux 3.7-rc5
Diffstat (limited to 'crypto/cryptd.c')
-rw-r--r-- | crypto/cryptd.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 671d4d6..7bdd61b 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -137,13 +137,18 @@ static void cryptd_queue_worker(struct work_struct *work) struct crypto_async_request *req, *backlog; cpu_queue = container_of(work, struct cryptd_cpu_queue, work); - /* Only handle one request at a time to avoid hogging crypto - * workqueue. preempt_disable/enable is used to prevent - * being preempted by cryptd_enqueue_request() */ + /* + * Only handle one request at a time to avoid hogging crypto workqueue. + * preempt_disable/enable is used to prevent being preempted by + * cryptd_enqueue_request(). local_bh_disable/enable is used to prevent + * cryptd_enqueue_request() being accessed from software interrupts. + */ + local_bh_disable(); preempt_disable(); backlog = crypto_get_backlog(&cpu_queue->queue); req = crypto_dequeue_request(&cpu_queue->queue); preempt_enable(); + local_bh_enable(); if (!req) return; |