summaryrefslogtreecommitdiffstats
path: root/crypto/algboss.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-18 12:03:29 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-18 12:03:29 +0200
commit8157ee2115fc343ccdadab671e2b75e285feaa60 (patch)
tree52db40213970636590e74774ffd2efb55f0ee578 /crypto/algboss.c
parent2e57f47d317dd035b18634b0c602272529368fcc (diff)
parent8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff)
Merge tag 'v3.10' into drm-intel-fixes
Backmerge Linux 3.10 to get at commit 19b2dbde5732170a03bd82cc8bd442cf88d856f7 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jun 12 10:15:12 2013 +0100 drm/i915: Restore fences after resume and GPU resets That commit is not in my current -fixes pile since that's based on my -next queue for 3.11. And the above mentioned fix was merged really late into 3.10 (and blew up, bad me) so was on a diverging branch. Option B would have been to rebase my current pile of fixes onto Dave's drm-fixes branch. But since some of the patches here are a bit tricky I've decided not to void all the testing by moving over the entire merge window. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r--crypto/algboss.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 769219b2930..76fc0b23fc6 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -45,10 +45,9 @@ struct cryptomgr_param {
} nu32;
} attrs[CRYPTO_MAX_ATTRS];
- char larval[CRYPTO_MAX_ALG_NAME];
char template[CRYPTO_MAX_ALG_NAME];
- struct completion *completion;
+ struct crypto_larval *larval;
u32 otype;
u32 omask;
@@ -87,7 +86,8 @@ static int cryptomgr_probe(void *data)
crypto_tmpl_put(tmpl);
out:
- complete_all(param->completion);
+ complete_all(&param->larval->completion);
+ crypto_alg_put(&param->larval->alg);
kfree(param);
module_put_and_exit(0);
}
@@ -187,18 +187,19 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
param->otype = larval->alg.cra_flags;
param->omask = larval->mask;
- memcpy(param->larval, larval->alg.cra_name, CRYPTO_MAX_ALG_NAME);
-
- param->completion = &larval->completion;
+ crypto_alg_get(&larval->alg);
+ param->larval = larval;
thread = kthread_run(cryptomgr_probe, param, "cryptomgr_probe");
if (IS_ERR(thread))
- goto err_free_param;
+ goto err_put_larval;
wait_for_completion_interruptible(&larval->completion);
return NOTIFY_STOP;
+err_put_larval:
+ crypto_alg_put(&larval->alg);
err_free_param:
kfree(param);
err_put_module: