summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-10-06 03:33:26 +0300
committerDavid S. Miller <davem@davemloft.net>2020-10-06 04:40:01 +0300
commit8b0308fe319b8002753ea66f8f940fb393792ddd (patch)
tree4c5a80346308db8cac9ff0951bb10e892c2387ad /net/socket.c
parentf4f9dcc3f4c5f576ee195bdf0fd1682da7a3a73a (diff)
parent7575fdda569b2a2e8be32c1a64ecb05d6f96a500 (diff)
downloadlinux-8b0308fe319b8002753ea66f8f940fb393792ddd.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Rejecting non-native endian BTF overlapped with the addition of support for it. The rest were more simple overlapping changes, except the renesas ravb binding update, which had to follow a file move as well as a YAML conversion. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c
index 82262e1922f9..6e6cccc2104f 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -3640,9 +3640,11 @@ EXPORT_SYMBOL(kernel_getpeername);
int kernel_sendpage(struct socket *sock, struct page *page, int offset,
size_t size, int flags)
{
- if (sock->ops->sendpage)
+ if (sock->ops->sendpage) {
+ /* Warn in case the improper page to zero-copy send */
+ WARN_ONCE(!sendpage_ok(page), "improper page for zero-copy send");
return sock->ops->sendpage(sock, page, offset, size, flags);
-
+ }
return sock_no_sendpage(sock, page, offset, size, flags);
}
EXPORT_SYMBOL(kernel_sendpage);