projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af21159
)
net: ipv4: tcp: Fix crash in tcp_nuke_addr
author
Colin Cross
<ccross@android.com>
Wed, 22 Jun 2011 21:27:37 +0000
(14:27 -0700)
committer
Colin Cross
<ccross@android.com>
Wed, 22 Jun 2011 21:42:06 +0000
(14:42 -0700)
ip_route_output_key can return an ERR_PTR, don't dereference it.
Change-Id: I6b86a451b2bdb33873d79b3cf90c11dbe72bc081
Signed-off-by: Colin Cross <ccross@android.com>
net/ipv4/tcp.c
patch
|
blob
|
history
diff --git
a/net/ipv4/tcp.c
b/net/ipv4/tcp.c
index d99fd5c91903ed9ff5f36a85c07ff201a3e9182d..0387db527de9925986f5c1b69f5ffc5a455833ab 100644
(file)
--- a/
net/ipv4/tcp.c
+++ b/
net/ipv4/tcp.c
@@
-3334,7
+3334,7
@@
static int tcp_is_local(struct net *net, __be32 addr) {
struct rtable *rt;
struct flowi4 fl4 = { .daddr = addr };
rt = ip_route_output_key(net, &fl4);
- if (
!rt
)
+ if (
IS_ERR_OR_NULL(rt)
)
return 0;
return rt->dst.dev && (rt->dst.dev->flags & IFF_LOOPBACK);
}