Skip to content
Snippets Groups Projects
Commit 15333038 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 31432412
No related branches found
No related tags found
No related merge requests found
......@@ -38,7 +38,7 @@ static inline void crypto_kunmap(void *vaddr, int out)
static inline void crypto_yield(struct crypto_tfm *tfm)
{
if (!in_softirq())
if (!in_atomic())
cond_resched();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment