Skip to content

Commit

Permalink
ipv6: sr: fix passing wrong flags to crypto_alloc_shash()
Browse files Browse the repository at this point in the history
The 'mask' argument to crypto_alloc_shash() uses the CRYPTO_ALG_* flags,
not 'gfp_t'.  So don't pass GFP_KERNEL to it.

Fixes: bf355b8 ("ipv6: sr: add core files for SR HMAC support")
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ebiggers authored and davem330 committed Jul 2, 2018
1 parent 603d4cf commit fc9c202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/seg6_hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static int seg6_hmac_init_algo(void)
return -ENOMEM;

for_each_possible_cpu(cpu) {
tfm = crypto_alloc_shash(algo->name, 0, GFP_KERNEL);
tfm = crypto_alloc_shash(algo->name, 0, 0);
if (IS_ERR(tfm))
return PTR_ERR(tfm);
p_tfm = per_cpu_ptr(algo->tfms, cpu);
Expand Down

0 comments on commit fc9c202

Please sign in to comment.