git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: add length argument to skb_copy_and_csum_datagram_iovec
[pandora-kernel.git]
/
net
/
rxrpc
/
ar-recvmsg.c
diff --git
a/net/rxrpc/ar-recvmsg.c
b/net/rxrpc/ar-recvmsg.c
index
4b48687
..
c67f5d3
100644
(file)
--- a/
net/rxrpc/ar-recvmsg.c
+++ b/
net/rxrpc/ar-recvmsg.c
@@
-87,7
+87,7
@@
int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
if (!skb) {
/* nothing remains on the queue */
if (copied &&
if (!skb) {
/* nothing remains on the queue */
if (copied &&
- (
msg->msg_
flags & MSG_PEEK || timeo == 0))
+ (flags & MSG_PEEK || timeo == 0))
goto out;
/* wait for a message to turn up */
goto out;
/* wait for a message to turn up */
@@
-143,10
+143,13
@@
int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
/* copy the peer address and timestamp */
if (!continue_call) {
/* copy the peer address and timestamp */
if (!continue_call) {
- if (msg->msg_name && msg->msg_namelen > 0)
+ if (msg->msg_name) {
+ size_t len =
+ sizeof(call->conn->trans->peer->srx);
memcpy(msg->msg_name,
memcpy(msg->msg_name,
- &call->conn->trans->peer->srx,
- sizeof(call->conn->trans->peer->srx));
+ &call->conn->trans->peer->srx, len);
+ msg->msg_namelen = len;
+ }
sock_recv_ts_and_drops(msg, &rx->sk, skb);
}
sock_recv_ts_and_drops(msg, &rx->sk, skb);
}
@@
-182,7
+185,8
@@
int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock,
msg->msg_iov, copy);
} else {
ret = skb_copy_and_csum_datagram_iovec(skb, offset,
msg->msg_iov, copy);
} else {
ret = skb_copy_and_csum_datagram_iovec(skb, offset,
- msg->msg_iov);
+ msg->msg_iov,
+ copy);
if (ret == -EINVAL)
goto csum_copy_error;
}
if (ret == -EINVAL)
goto csum_copy_error;
}