diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-05-23 15:36:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-05-23 15:36:25 -0400 |
commit | 15333038d577b0c0255c0f14a38d9e6895937453 (patch) | |
tree | c48106158bce4c7af328c486b7f33ad2133459ee | |
parent | 314324121f9b94b2ca657a494cf2b9cb0e4a28cc (diff) |
[CRYPTO]: Only reschedule if !in_atomic()
The netlink gfp_any() problem made me double-check the uses of in_softirq()
in crypto/*. It seems to me that we should be checking in_atomic() instead
of in_softirq() in crypto_yield. Otherwise people calling the crypto ops
with spin locks held or preemption disabled will get burnt, right?
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | crypto/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index e68e43886d3c..964b9a60ca24 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -38,7 +38,7 @@ static inline void crypto_kunmap(void *vaddr, int out) | |||
38 | 38 | ||
39 | static inline void crypto_yield(struct crypto_tfm *tfm) | 39 | static inline void crypto_yield(struct crypto_tfm *tfm) |
40 | { | 40 | { |
41 | if (!in_softirq()) | 41 | if (!in_atomic()) |
42 | cond_resched(); | 42 | cond_resched(); |
43 | } | 43 | } |
44 | 44 | ||