diff options
Diffstat (limited to 'patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch')
-rw-r--r-- | patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch b/patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index b2a392f80cde..2d9a85243c3a 100644 --- a/patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +++ b/patches/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/crypto/cryptd.c +++ b/crypto/cryptd.c -@@ -34,6 +34,7 @@ MODULE_PARM_DESC(cryptd_max_cpu_qlen, "S +@@ -36,6 +36,7 @@ static struct workqueue_struct *cryptd_w struct cryptd_cpu_queue { struct crypto_queue queue; struct work_struct work; @@ -27,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> }; struct cryptd_queue { -@@ -103,6 +104,7 @@ static int cryptd_init_queue(struct cryp +@@ -105,6 +106,7 @@ static int cryptd_init_queue(struct cryp cpu_queue = per_cpu_ptr(queue->cpu_queue, cpu); crypto_init_queue(&cpu_queue->queue, max_cpu_qlen); INIT_WORK(&cpu_queue->work, cryptd_queue_worker); @@ -35,9 +35,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } pr_info("cryptd: max_cpu_qlen set to %d\n", max_cpu_qlen); return 0; -@@ -127,8 +129,10 @@ static int cryptd_enqueue_request(struct +@@ -129,8 +131,10 @@ static int cryptd_enqueue_request(struct struct cryptd_cpu_queue *cpu_queue; - atomic_t *refcnt; + refcount_t *refcnt; - cpu = get_cpu(); - cpu_queue = this_cpu_ptr(queue->cpu_queue); @@ -48,8 +48,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> err = crypto_enqueue_request(&cpu_queue->queue, request); refcnt = crypto_tfm_ctx(request->tfm); -@@ -144,7 +148,7 @@ static int cryptd_enqueue_request(struct - atomic_inc(refcnt); +@@ -146,7 +150,7 @@ static int cryptd_enqueue_request(struct + refcount_inc(refcnt); out_put_cpu: - put_cpu(); @@ -57,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return err; } -@@ -160,16 +164,11 @@ static void cryptd_queue_worker(struct w +@@ -162,16 +166,11 @@ static void cryptd_queue_worker(struct w cpu_queue = container_of(work, struct cryptd_cpu_queue, work); /* * Only handle one request at a time to avoid hogging crypto workqueue. |