diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/Kconfig | 2 | ||||
-rw-r--r-- | crypto/api.c | 4 | ||||
-rw-r--r-- | crypto/cryptd.c | 4 | ||||
-rw-r--r-- | crypto/cryptomgr.c | 7 | ||||
-rw-r--r-- | crypto/tcrypt.c | 2 |
5 files changed, 11 insertions, 8 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 620e14cabd..4ca0ab3448 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
@@ -271,7 +271,7 @@ config CRYPTO_SERPENT | |||
271 | 271 | ||
272 | Keys are allowed to be from 0 to 256 bits in length, in steps | 272 | Keys are allowed to be from 0 to 256 bits in length, in steps |
273 | of 8 bits. Also includes the 'Tnepres' algorithm, a reversed | 273 | of 8 bits. Also includes the 'Tnepres' algorithm, a reversed |
274 | variant of Serpent for compatibility with old kerneli code. | 274 | variant of Serpent for compatibility with old kerneli.org code. |
275 | 275 | ||
276 | See also: | 276 | See also: |
277 | <http://www.cl.cam.ac.uk/~rja14/serpent.html> | 277 | <http://www.cl.cam.ac.uk/~rja14/serpent.html> |
diff --git a/crypto/api.c b/crypto/api.c index 55af8bb0f0..33734fd919 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -48,8 +48,10 @@ EXPORT_SYMBOL_GPL(crypto_mod_get); | |||
48 | 48 | ||
49 | void crypto_mod_put(struct crypto_alg *alg) | 49 | void crypto_mod_put(struct crypto_alg *alg) |
50 | { | 50 | { |
51 | struct module *module = alg->cra_module; | ||
52 | |||
51 | crypto_alg_put(alg); | 53 | crypto_alg_put(alg); |
52 | module_put(alg->cra_module); | 54 | module_put(module); |
53 | } | 55 | } |
54 | EXPORT_SYMBOL_GPL(crypto_mod_put); | 56 | EXPORT_SYMBOL_GPL(crypto_mod_put); |
55 | 57 | ||
diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 3ff4e1f0f0..ac6dce2e75 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c | |||
@@ -298,7 +298,7 @@ static inline int cryptd_create_thread(struct cryptd_state *state, | |||
298 | mutex_init(&state->mutex); | 298 | mutex_init(&state->mutex); |
299 | crypto_init_queue(&state->queue, CRYPTD_MAX_QLEN); | 299 | crypto_init_queue(&state->queue, CRYPTD_MAX_QLEN); |
300 | 300 | ||
301 | state->task = kthread_create(fn, state, name); | 301 | state->task = kthread_run(fn, state, name); |
302 | if (IS_ERR(state->task)) | 302 | if (IS_ERR(state->task)) |
303 | return PTR_ERR(state->task); | 303 | return PTR_ERR(state->task); |
304 | 304 | ||
@@ -316,6 +316,8 @@ static int cryptd_thread(void *data) | |||
316 | struct cryptd_state *state = data; | 316 | struct cryptd_state *state = data; |
317 | int stop; | 317 | int stop; |
318 | 318 | ||
319 | current->flags |= PF_NOFREEZE; | ||
320 | |||
319 | do { | 321 | do { |
320 | struct crypto_async_request *req, *backlog; | 322 | struct crypto_async_request *req, *backlog; |
321 | 323 | ||
diff --git a/crypto/cryptomgr.c b/crypto/cryptomgr.c index 6958ea83ee..e5fb7cca51 100644 --- a/crypto/cryptomgr.c +++ b/crypto/cryptomgr.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "internal.h" | 24 | #include "internal.h" |
25 | 25 | ||
26 | struct cryptomgr_param { | 26 | struct cryptomgr_param { |
27 | struct task_struct *thread; | ||
28 | |||
29 | struct rtattr *tb[CRYPTOA_MAX]; | 27 | struct rtattr *tb[CRYPTOA_MAX]; |
30 | 28 | ||
31 | struct { | 29 | struct { |
@@ -81,6 +79,7 @@ err: | |||
81 | 79 | ||
82 | static int cryptomgr_schedule_probe(struct crypto_larval *larval) | 80 | static int cryptomgr_schedule_probe(struct crypto_larval *larval) |
83 | { | 81 | { |
82 | struct task_struct *thread; | ||
84 | struct cryptomgr_param *param; | 83 | struct cryptomgr_param *param; |
85 | const char *name = larval->alg.cra_name; | 84 | const char *name = larval->alg.cra_name; |
86 | const char *p; | 85 | const char *p; |
@@ -130,8 +129,8 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval) | |||
130 | 129 | ||
131 | memcpy(param->larval.name, larval->alg.cra_name, CRYPTO_MAX_ALG_NAME); | 130 | memcpy(param->larval.name, larval->alg.cra_name, CRYPTO_MAX_ALG_NAME); |
132 | 131 | ||
133 | param->thread = kthread_run(cryptomgr_probe, param, "cryptomgr"); | 132 | thread = kthread_run(cryptomgr_probe, param, "cryptomgr"); |
134 | if (IS_ERR(param->thread)) | 133 | if (IS_ERR(thread)) |
135 | goto err_free_param; | 134 | goto err_free_param; |
136 | 135 | ||
137 | return NOTIFY_STOP; | 136 | return NOTIFY_STOP; |
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index f0aed0106a..11f9359538 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -691,7 +691,7 @@ static int test_hash_cycles(struct hash_desc *desc, char *p, int blen, | |||
691 | if (ret) | 691 | if (ret) |
692 | goto out; | 692 | goto out; |
693 | } | 693 | } |
694 | crypto_hash_final(desc, out); | 694 | ret = crypto_hash_final(desc, out); |
695 | if (ret) | 695 | if (ret) |
696 | goto out; | 696 | goto out; |
697 | } | 697 | } |