summaryrefslogtreecommitdiff
path: root/net/rxrpc/recvmsg.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-17 12:49:11 +0300
committerDavid Howells <dhowells@redhat.com>2016-09-17 12:50:49 +0300
commit2e2ea51dec2ab6a81950d4b436eb66ebf45dd507 (patch)
treeaab85ecd55cf497bdbe67dddb8eea9d0cabb5e5b /net/rxrpc/recvmsg.c
parent4b22457c06a3a950e14938c486283ad0f308c13d (diff)
downloadlinux-2e2ea51dec2ab6a81950d4b436eb66ebf45dd507.tar.xz
rxrpc: Check the return value of rxrpc_locate_data()
Check the return value of rxrpc_locate_data() in rxrpc_recvmsg_data(). Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/recvmsg.c')
-rw-r--r--net/rxrpc/recvmsg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index 0d085f5cf1bf..1edf2cf62cc5 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -300,10 +300,13 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
if (msg)
sock_recv_timestamp(msg, sock->sk, skb);
- if (rx_pkt_offset == 0)
+ if (rx_pkt_offset == 0) {
ret = rxrpc_locate_data(call, skb,
&call->rxtx_annotations[ix],
&rx_pkt_offset, &rx_pkt_len);
+ if (ret < 0)
+ goto out;
+ }
_debug("recvmsg %x DATA #%u { %d, %d }",
sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len);