Skip to content

Commit

Permalink
crypto: ahash - Use GFP_KERNEL in unaligned setkey
Browse files Browse the repository at this point in the history
We currently use GFP_ATOMIC in the unaligned setkey function
to allocate the temporary aligned buffer.  Since setkey must
be called in a sleepable context, we can use GFP_KERNEL instead.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jul 14, 2009
1 parent 0e2d3a1 commit 093900c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/ahash.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key,
unsigned long absize;

absize = keylen + alignmask;
buffer = kmalloc(absize, GFP_ATOMIC);
buffer = kmalloc(absize, GFP_KERNEL);
if (!buffer)
return -ENOMEM;

Expand Down

0 comments on commit 093900c

Please sign in to comment.