projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fef768
)
netrom: copy_datagram_iovec can fail
author
Alan Cox
<alan@linux.intel.com>
Tue, 4 Sep 2012 04:13:18 +0000
(
04:13
+0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 4 Sep 2012 16:57:35 +0000
(12:57 -0400)
Check for an error from this and if so bail properly.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netrom/af_netrom.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netrom/af_netrom.c
b/net/netrom/af_netrom.c
index 06592d8b4a2b4eba33d9e71e44fc75ca206b38a8..1b9024ee963c64f33b9240a0726dd67b83711567 100644
(file)
--- a/
net/netrom/af_netrom.c
+++ b/
net/netrom/af_netrom.c
@@
-1169,7
+1169,12
@@
static int nr_recvmsg(struct kiocb *iocb, struct socket *sock,
msg->msg_flags |= MSG_TRUNC;
}
- skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
+ er = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
+ if (er < 0) {
+ skb_free_datagram(sk, skb);
+ release_sock(sk);
+ return er;
+ }
if (sax != NULL) {
sax->sax25_family = AF_NETROM;