projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
inet: fix possible panic in reqsk_queue_unlink()
[cascardo/linux.git]
/
net
/
ipv4
/
tcp_ipv4.c
diff --git
a/net/ipv4/tcp_ipv4.c
b/net/ipv4/tcp_ipv4.c
index
3571f2b
..
fc1c658
100644
(file)
--- a/
net/ipv4/tcp_ipv4.c
+++ b/
net/ipv4/tcp_ipv4.c
@@
-1348,7
+1348,8
@@
static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
req = inet_csk_search_req(sk, th->source, iph->saddr, iph->daddr);
if (req) {
nsk = tcp_check_req(sk, skb, req, false);
- reqsk_put(req);
+ if (!nsk)
+ reqsk_put(req);
return nsk;
}