summaryrefslogtreecommitdiff
path: root/crypto/cryptd.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2013-01-07 12:06:43 +1100
committerJames Morris <james.l.morris@oracle.com>2013-01-07 12:06:43 +1100
commitca10c662b0ec80db86864277a94889cc63bae958 (patch)
treedaaf99d935098038fd66e1bd238dcd3746dc5ea4 /crypto/cryptd.c
parentfb6e03d937365cba54d5d8d923158562169ebfd1 (diff)
parent1c11ed58397f048d8187222927092b397a149d70 (diff)
downloadlinux-crypto-ca10c662b0ec80db86864277a94889cc63bae958.tar.gz
linux-crypto-ca10c662b0ec80db86864277a94889cc63bae958.zip
Merge tag 'v3.8-rc2' into next
Sync to Linus' tree. Linux 3.8-rc2
Diffstat (limited to '')
-rw-r--r--crypto/cryptd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 671d4d6d..7bdd61b8 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;