提交 dc5bc3f1 编写于 作者: L Linus Torvalds

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fix from Herbert Xu:
 "This fixes a problem in the Crypto API that may cause spurious errors
  when signals are received by the process that made the orignal system
  call into the kernel"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: api - Only abort operations on fatal signal
...@@ -706,7 +706,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name, ...@@ -706,7 +706,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
err: err:
if (err != -EAGAIN) if (err != -EAGAIN)
break; break;
if (signal_pending(current)) { if (fatal_signal_pending(current)) {
err = -EINTR; err = -EINTR;
break; break;
} }
......
...@@ -345,7 +345,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval) ...@@ -345,7 +345,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
crypto_alg_tested(larval->alg.cra_driver_name, 0); crypto_alg_tested(larval->alg.cra_driver_name, 0);
} }
err = wait_for_completion_interruptible(&larval->completion); err = wait_for_completion_killable(&larval->completion);
WARN_ON(err); WARN_ON(err);
out: out:
......
...@@ -172,7 +172,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg) ...@@ -172,7 +172,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
struct crypto_larval *larval = (void *)alg; struct crypto_larval *larval = (void *)alg;
long timeout; long timeout;
timeout = wait_for_completion_interruptible_timeout( timeout = wait_for_completion_killable_timeout(
&larval->completion, 60 * HZ); &larval->completion, 60 * HZ);
alg = larval->adult; alg = larval->adult;
...@@ -445,7 +445,7 @@ struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask) ...@@ -445,7 +445,7 @@ struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask)
err: err:
if (err != -EAGAIN) if (err != -EAGAIN)
break; break;
if (signal_pending(current)) { if (fatal_signal_pending(current)) {
err = -EINTR; err = -EINTR;
break; break;
} }
...@@ -562,7 +562,7 @@ void *crypto_alloc_tfm(const char *alg_name, ...@@ -562,7 +562,7 @@ void *crypto_alloc_tfm(const char *alg_name,
err: err:
if (err != -EAGAIN) if (err != -EAGAIN)
break; break;
if (signal_pending(current)) { if (fatal_signal_pending(current)) {
err = -EINTR; err = -EINTR;
break; break;
} }
......
...@@ -375,7 +375,7 @@ static struct crypto_alg *crypto_user_skcipher_alg(const char *name, u32 type, ...@@ -375,7 +375,7 @@ static struct crypto_alg *crypto_user_skcipher_alg(const char *name, u32 type,
err = PTR_ERR(alg); err = PTR_ERR(alg);
if (err != -EAGAIN) if (err != -EAGAIN)
break; break;
if (signal_pending(current)) { if (fatal_signal_pending(current)) {
err = -EINTR; err = -EINTR;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册