diff options
Diffstat (limited to 'crypto/blkcipher.c')
-rw-r--r-- | crypto/blkcipher.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 6e93004f2181..cbb4c4e5c229 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/crypto.h> | 17 | #include <linux/crypto.h> |
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/hardirq.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
21 | #include <linux/scatterlist.h> | 22 | #include <linux/scatterlist.h> |
@@ -313,6 +314,9 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc, | |||
313 | struct crypto_blkcipher *tfm = desc->tfm; | 314 | struct crypto_blkcipher *tfm = desc->tfm; |
314 | unsigned int alignmask = crypto_blkcipher_alignmask(tfm); | 315 | unsigned int alignmask = crypto_blkcipher_alignmask(tfm); |
315 | 316 | ||
317 | if (WARN_ON_ONCE(in_irq())) | ||
318 | return -EDEADLK; | ||
319 | |||
316 | walk->nbytes = walk->total; | 320 | walk->nbytes = walk->total; |
317 | if (unlikely(!walk->total)) | 321 | if (unlikely(!walk->total)) |
318 | return 0; | 322 | return 0; |