[PATCH] tcp: correctly crypto_alloc_hash return check

Subsystems: networking [general], networking [tcp], the rest

STALE3828d

2 messages, 2 authors, 2016-02-18 · open the first message on its own page

[PATCH] tcp: correctly crypto_alloc_hash return check

From: Insu Yun <hidden>
Date: 2016-02-16 02:30:38

crypto_alloc_hash never returns NULL

Signed-off-by: Insu Yun <redacted>
---
 net/ipv4/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index fd17eec..a95aac1 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2946,7 +2946,7 @@ static void __tcp_alloc_md5sig_pool(void)
 			struct crypto_hash *hash;
 
 			hash = crypto_alloc_hash("md5", 0, CRYPTO_ALG_ASYNC);
-			if (IS_ERR_OR_NULL(hash))
+			if (IS_ERR(hash))
 				return;
 			per_cpu(tcp_md5sig_pool, cpu).md5_desc.tfm = hash;
 		}
-- 
1.9.1

Re: [PATCH] tcp: correctly crypto_alloc_hash return check

From: David Miller <davem@davemloft.net>
Date: 2016-02-18 03:23:29

From: Insu Yun <redacted>
Date: Mon, 15 Feb 2016 21:30:33 -0500
crypto_alloc_hash never returns NULL

Signed-off-by: Insu Yun <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help