Skip to content

Commit

Permalink
Merge tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block
Browse files Browse the repository at this point in the history
Pull io_uring fixes from Jens Axboe:
 "Two small patches:

   - Fix using an unsigned type for the return value, introduced in this
     release (Pavel)

   - Stable fix for a missing check for a fixed file on put (me)"

* tag 'io_uring-6.0-2022-09-16' of git://git.kernel.dk/linux-block:
  io_uring/msg_ring: check file type before putting
  io_uring/rw: fix error'ed retry return values
  • Loading branch information
Linus Torvalds committed Sep 16, 2022
2 parents 5763d7f + fc7222c commit 0158137
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion io_uring/msg_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)
req_set_fail(req);
io_req_set_res(req, ret, 0);
/* put file to avoid an attempt to IOPOLL the req */
io_put_file(req->file);
if (!(req->flags & REQ_F_FIXED_FILE))
io_put_file(req->file);
req->file = NULL;
return IOU_OK;
}
2 changes: 1 addition & 1 deletion io_uring/rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static bool __io_complete_rw_common(struct io_kiocb *req, long res)
return false;
}

static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res)
static inline int io_fixup_rw_res(struct io_kiocb *req, long res)
{
struct io_async_rw *io = req->async_data;

Expand Down

0 comments on commit 0158137

Please sign in to comment.