projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1528540
)
ipv4: tcp_minisocks: use BUG_ON instead of if condition followed by BUG
author
Gustavo A. R. Silva
<garsilva@embeddedor.com>
Mon, 23 Oct 2017 18:10:56 +0000
(13:10 -0500)
committer
David S. Miller
<davem@davemloft.net>
Tue, 24 Oct 2017 09:44:42 +0000
(18:44 +0900)
Use BUG_ON instead of if condition followed by BUG in tcp_time_wait.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_minisocks.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/tcp_minisocks.c
b/net/ipv4/tcp_minisocks.c
index 2341b9f857b60bf2dd7d107afcc61a68c79800c0..a952357054f4ddfbb98746ebcf323d1c45f7e951 100644
(file)
--- a/
net/ipv4/tcp_minisocks.c
+++ b/
net/ipv4/tcp_minisocks.c
@@
-298,8
+298,7
@@
void tcp_time_wait(struct sock *sk, int state, int timeo)
key = tp->af_specific->md5_lookup(sk, sk);
if (key) {
tcptw->tw_md5_key = kmemdup(key, sizeof(*key), GFP_ATOMIC);
- if (tcptw->tw_md5_key && !tcp_alloc_md5sig_pool())
- BUG();
+ BUG_ON(tcptw->tw_md5_key && !tcp_alloc_md5sig_pool());
}
} while (0);
#endif