mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
[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>
This commit is contained in:
parent
314324121f
commit
15333038d5
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue