aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-07-22 14:53:33 -0700
committerJakub Kicinski <kuba@kernel.org>2022-07-22 14:53:33 -0700
commit3c47fb2f4c4df33881fa540e35e21415a6ecfbb5 (patch)
treecd6ad1a793a2384453ab216d7040d11502f036c8 /net/core
parentmlxsw: core: Fix use-after-free calling devl_unlock() in mlxsw_core_bus_device_unregister() (diff)
parentnet: fix uninitialised msghdr->sg_from_iter (diff)
downloadlinux-dev-3c47fb2f4c4df33881fa540e35e21415a6ecfbb5.tar.xz
linux-dev-3c47fb2f4c4df33881fa540e35e21415a6ecfbb5.zip
Merge branch 'io_uring-zerocopy-send' of git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux
Pull in Pavel's patch from a shared branch. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c
index 8c702904d960..f3988ef8e9af 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -616,7 +616,7 @@ int __zerocopy_sg_from_iter(struct msghdr *msg, struct sock *sk,
{
int frag;
- if (msg && msg->sg_from_iter)
+ if (msg && msg->msg_ubuf && msg->sg_from_iter)
return msg->sg_from_iter(sk, skb, from, length);
frag = skb_shinfo(skb)->nr_frags;