diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-18 00:22:27 +0100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-12-18 00:22:27 +0100 |
commit | 376bddd34433065aeb9b9a140870537feecf90ef (patch) | |
tree | a40e2b84ad89f4b3ba968de65a4bf7ff6ccae835 /crypto/cryptd.c | |
parent | powerpc+of: Rename and fix OF reconfig notifier error inject module (diff) | |
parent | powerpc: mpc5200: Add a3m071 board support (diff) | |
download | linux-376bddd34433065aeb9b9a140870537feecf90ef.tar.xz linux-376bddd34433065aeb9b9a140870537feecf90ef.zip |
Merge remote-tracking branch 'agust/next' into next
Brings some 52xx updates. Also manually merged tools/perf/perf.h.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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 671d4d6d14df..7bdd61b867c8 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; |