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:
d458fd8
)
[APPLETALK]: Fix potential OOPS in atalk_sendmsg().
author
David S. Miller
<davem@sunset.davemloft.net>
Fri, 27 Oct 2006 22:26:21 +0000
(15:26 -0700)
committer
David S. Miller
<davem@sunset.davemloft.net>
Mon, 30 Oct 2006 23:24:34 +0000
(15:24 -0800)
atrtr_find() can return NULL, so do not blindly dereference
rt->dev before we check for rt being NULL.
Signed-off-by: David S. Miller <davem@davemloft.net>
net/appletalk/ddp.c
patch
|
blob
|
history
diff --git
a/net/appletalk/ddp.c
b/net/appletalk/ddp.c
index 708e2e0371aff2ae8be46529c112be0078e58686..485e35c3b28bac873b468eda0239b03958df71e3 100644
(file)
--- a/
net/appletalk/ddp.c
+++ b/
net/appletalk/ddp.c
@@
-1584,7
+1584,6
@@
static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
if (usat->sat_addr.s_net || usat->sat_addr.s_node == ATADDR_ANYNODE) {
rt = atrtr_find(&usat->sat_addr);
- dev = rt->dev;
} else {
struct atalk_addr at_hint;
@@
-1592,7
+1591,6
@@
static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
at_hint.s_net = at->src_net;
rt = atrtr_find(&at_hint);
- dev = rt->dev;
}
if (!rt)
return -ENETUNREACH;