netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ipv6: sr: fix passing wrong flags to crypto_alloc_shash()
@ 2018-06-30 22:26 Eric Biggers
  2018-07-02 11:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2018-06-30 22:26 UTC (permalink / raw)
  To: netdev, David S . Miller; +Cc: David Lebrun, linux-crypto, Eric Biggers

From: Eric Biggers <ebiggers@google.com>

The 'mask' argument to crypto_alloc_shash() uses the CRYPTO_ALG_* flags,
not 'gfp_t'.  So don't pass GFP_KERNEL to it.

Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 net/ipv6/seg6_hmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c
index 33fb35cbfac13..558fe8cc6d438 100644
--- a/net/ipv6/seg6_hmac.c
+++ b/net/ipv6/seg6_hmac.c
@@ -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);
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] ipv6: sr: fix passing wrong flags to crypto_alloc_shash()
  2018-06-30 22:26 [PATCH net] ipv6: sr: fix passing wrong flags to crypto_alloc_shash() Eric Biggers
@ 2018-07-02 11:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-02 11:37 UTC (permalink / raw)
  To: ebiggers3; +Cc: netdev, david.lebrun, linux-crypto, ebiggers

From: Eric Biggers <ebiggers3@gmail.com>
Date: Sat, 30 Jun 2018 15:26:56 -0700

> From: Eric Biggers <ebiggers@google.com>
> 
> The 'mask' argument to crypto_alloc_shash() uses the CRYPTO_ALG_* flags,
> not 'gfp_t'.  So don't pass GFP_KERNEL to it.
> 
> Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Oops, applied and queued up for -stable, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-02 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-30 22:26 [PATCH net] ipv6: sr: fix passing wrong flags to crypto_alloc_shash() Eric Biggers
2018-07-02 11:37 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).