diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-21 20:21:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-07-21 20:21:51 -0300 |
commit | f0ac15bbc96ebfde7dfe128f8260d58fc794fbe3 (patch) | |
tree | 2c8338c93b2e5e1c4fb2c36de1524adf76605f25 /crypto/algboss.c | |
parent | ab1aff59fb9770e4a5b931293a695416cf23000c (diff) | |
parent | 60c61f0d0919094cede7f96cf52cc79829b82e02 (diff) | |
download | linux-crypto-f0ac15bbc96ebfde7dfe128f8260d58fc794fbe3.tar.gz linux-crypto-f0ac15bbc96ebfde7dfe128f8260d58fc794fbe3.zip |
Merge tag 'v3.11-rc2' into patchwork
Linux 3.11-rc2
* tag 'v3.11-rc2': (9535 commits)
Linux 3.11-rc2
ext3: fix a BUG when opening a file with O_TMPFILE flag
ext4: fix a BUG when opening a file with O_TMPFILE flag
vfs: constify dentry parameter in d_count()
livelock avoidance in sget()
allow O_TMPFILE to work with O_WRONLY
Btrfs: fix wrong write offset when replacing a device
Btrfs: re-add root to dead root list if we stop dropping it
Btrfs: fix lock leak when resuming snapshot deletion
Btrfs: update drop progress before stopping snapshot dropping
arm64: use common reboot infrastructure
arm64: mm: don't treat user cache maintenance faults as writes
arm64: add '#ifdef CONFIG_COMPAT' for aarch32_break_handler()
arm64: Only enable local interrupts after the CPU is marked online
MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION
um: remove dead code
um: siginfo cleanup
MIPS: Octeon: Fix DT pruning bug with pip ports
uml: Fix which_tmpdir failure when /dev/shm is a symlink, and in other edge cases
um: Fix wait_stub_done() error handling
...
Diffstat (limited to 'crypto/algboss.c')
-rw-r--r-- | crypto/algboss.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crypto/algboss.c b/crypto/algboss.c index 769219b2..76fc0b23 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(¶m->larval->completion); + crypto_alg_put(¶m->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: |