diff options
author | Ingo Molnar | 2013-12-16 14:51:32 +0100 |
---|---|---|
committer | Ingo Molnar | 2013-12-16 14:51:32 +0100 |
commit | fe361cfcf40ad4612226347573a8669cd0d44799 (patch) | |
tree | e874ef5a29c3bfe3dd67dc2d8962562c00fc8e3a /net/appletalk/ddp.c | |
parent | perf: Optimize ring-buffer write by depending on control dependencies (diff) | |
parent | Linux 3.13-rc4 (diff) | |
download | kernel-qcow2-linux-fe361cfcf40ad4612226347573a8669cd0d44799.tar.gz kernel-qcow2-linux-fe361cfcf40ad4612226347573a8669cd0d44799.tar.xz kernel-qcow2-linux-fe361cfcf40ad4612226347573a8669cd0d44799.zip |
Merge tag 'v3.13-rc4' into perf/core
Merge Linux 3.13-rc4, to refresh this branch with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/appletalk/ddp.c')
-rw-r--r-- | net/appletalk/ddp.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 7fee50d637f9..7d424ac6e760 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c @@ -1735,7 +1735,6 @@ static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr size_t size, int flags) { struct sock *sk = sock->sk; - struct sockaddr_at *sat = (struct sockaddr_at *)msg->msg_name; struct ddpehdr *ddp; int copied = 0; int offset = 0; @@ -1764,14 +1763,13 @@ static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr } err = skb_copy_datagram_iovec(skb, offset, msg->msg_iov, copied); - if (!err) { - if (sat) { - sat->sat_family = AF_APPLETALK; - sat->sat_port = ddp->deh_sport; - sat->sat_addr.s_node = ddp->deh_snode; - sat->sat_addr.s_net = ddp->deh_snet; - } - msg->msg_namelen = sizeof(*sat); + if (!err && msg->msg_name) { + struct sockaddr_at *sat = msg->msg_name; + sat->sat_family = AF_APPLETALK; + sat->sat_port = ddp->deh_sport; + sat->sat_addr.s_node = ddp->deh_snode; + sat->sat_addr.s_net = ddp->deh_snet; + msg->msg_namelen = sizeof(*sat); } skb_free_datagram(sk, skb); /* Free the datagram. */ |