diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-10-24 23:44:11 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-10-24 23:44:11 +0300 |
commit | 96917bb3a377e1ed103fd5c420a95e5fb25ca104 (patch) | |
tree | 59e0ef14e8707efba95d2f795742ba69a03bc8d0 /io_uring/msg_ring.c | |
parent | 86d6f77a3cce1189ab7c31e52e4d47ca58e7a601 (diff) | |
parent | 337a0a0b63f1c30195733eaacf39e4310a592a68 (diff) | |
download | linux-96917bb3a377e1ed103fd5c420a95e5fb25ca104.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/linux/net.h
a5ef058dc4d9 ("net: introduce and use custom sockopt socket flag")
e993ffe3da4b ("net: flag sockets supporting msghdr originated zerocopy")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'io_uring/msg_ring.c')
-rw-r--r-- | io_uring/msg_ring.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index 4a7e5d030c78..90d2fc6fd80e 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -95,6 +95,9 @@ static int io_msg_send_fd(struct io_kiocb *req, unsigned int issue_flags) msg->src_fd = array_index_nospec(msg->src_fd, ctx->nr_user_files); file_ptr = io_fixed_file_slot(&ctx->file_table, msg->src_fd)->file_ptr; + if (!file_ptr) + goto out_unlock; + src_file = (struct file *) (file_ptr & FFS_MASK); get_file(src_file); |