summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-12-22 00:06:20 +0100
committerDavid S. Miller <davem@davemloft.net>2018-12-22 00:06:20 +0100
commitce28bb4453880759c5bdc2751629f1a865ea4a6e (patch)
tree549617a3c6ffb55402cb403b1d808a11e113b294 /net/core
parentMerge branch 'skb_ext-fixes' (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (diff)
downloadlinux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.tar.xz
linux-ce28bb4453880759c5bdc2751629f1a865ea4a6e.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skmsg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/skmsg.c b/net/core/skmsg.c
index 86c9726fced8..26458876d763 100644
--- a/net/core/skmsg.c
+++ b/net/core/skmsg.c
@@ -94,6 +94,9 @@ int sk_msg_clone(struct sock *sk, struct sk_msg *dst, struct sk_msg *src,
}
while (len) {
+ if (sk_msg_full(dst))
+ return -ENOSPC;
+
sge_len = sge->length - off;
sge_off = sge->offset + off;
if (sge_len > len)