mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Merge tag 'io_uring-5.8-2020-07-12' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe: "Two late fixes again: - Fix missing msg_name assignment in certain cases (Pavel) - Correct a previous fix for full coverage (Pavel)" * tag 'io_uring-5.8-2020-07-12' of git://git.kernel.dk/linux-block: io_uring: fix not initialised work->flags io_uring: fix missing msg_name assignment
This commit is contained in:
@@ -1096,6 +1096,8 @@ static inline void io_prep_async_work(struct io_kiocb *req,
|
|||||||
{
|
{
|
||||||
const struct io_op_def *def = &io_op_defs[req->opcode];
|
const struct io_op_def *def = &io_op_defs[req->opcode];
|
||||||
|
|
||||||
|
io_req_init_async(req);
|
||||||
|
|
||||||
if (req->flags & REQ_F_ISREG) {
|
if (req->flags & REQ_F_ISREG) {
|
||||||
if (def->hash_reg_file)
|
if (def->hash_reg_file)
|
||||||
io_wq_hash_work(&req->work, file_inode(req->file));
|
io_wq_hash_work(&req->work, file_inode(req->file));
|
||||||
@@ -1104,7 +1106,6 @@ static inline void io_prep_async_work(struct io_kiocb *req,
|
|||||||
req->work.flags |= IO_WQ_WORK_UNBOUND;
|
req->work.flags |= IO_WQ_WORK_UNBOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
io_req_init_async(req);
|
|
||||||
io_req_work_grab_env(req, def);
|
io_req_work_grab_env(req, def);
|
||||||
|
|
||||||
*link = io_prep_linked_timeout(req);
|
*link = io_prep_linked_timeout(req);
|
||||||
@@ -3553,6 +3554,7 @@ static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
|||||||
if (req->flags & REQ_F_NEED_CLEANUP)
|
if (req->flags & REQ_F_NEED_CLEANUP)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
io->msg.msg.msg_name = &io->msg.addr;
|
||||||
io->msg.iov = io->msg.fast_iov;
|
io->msg.iov = io->msg.fast_iov;
|
||||||
ret = sendmsg_copy_msghdr(&io->msg.msg, sr->msg, sr->msg_flags,
|
ret = sendmsg_copy_msghdr(&io->msg.msg, sr->msg, sr->msg_flags,
|
||||||
&io->msg.iov);
|
&io->msg.iov);
|
||||||
@@ -3734,6 +3736,7 @@ static int __io_compat_recvmsg_copy_hdr(struct io_kiocb *req,
|
|||||||
|
|
||||||
static int io_recvmsg_copy_hdr(struct io_kiocb *req, struct io_async_ctx *io)
|
static int io_recvmsg_copy_hdr(struct io_kiocb *req, struct io_async_ctx *io)
|
||||||
{
|
{
|
||||||
|
io->msg.msg.msg_name = &io->msg.addr;
|
||||||
io->msg.iov = io->msg.fast_iov;
|
io->msg.iov = io->msg.fast_iov;
|
||||||
|
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
Reference in New Issue
Block a user