Commit 199b7f84 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'io_uring-5.17-2022-02-11' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:

 - Fix a false-positive warning from an older gcc (Alviro)

 - Allow oom killer invocations from io_uring_setup (Shakeel)

* tag 'io_uring-5.17-2022-02-11' of git://git.kernel.dk/linux-block:
  mm: io_uring: allow oom-killer from io_uring_setup
  io_uring: Clean up a false-positive warning from GCC 9.3.0
parents 0b9df436 0a3f1e0b
...@@ -5228,7 +5228,6 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags) ...@@ -5228,7 +5228,6 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags)
min_ret = iov_iter_count(&msg.msg_iter); min_ret = iov_iter_count(&msg.msg_iter);
ret = sock_recvmsg(sock, &msg, flags); ret = sock_recvmsg(sock, &msg, flags);
out_free:
if (ret < min_ret) { if (ret < min_ret) {
if (ret == -EAGAIN && force_nonblock) if (ret == -EAGAIN && force_nonblock)
return -EAGAIN; return -EAGAIN;
...@@ -5236,9 +5235,9 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags) ...@@ -5236,9 +5235,9 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags)
ret = -EINTR; ret = -EINTR;
req_set_fail(req); req_set_fail(req);
} else if ((flags & MSG_WAITALL) && (msg.msg_flags & (MSG_TRUNC | MSG_CTRUNC))) { } else if ((flags & MSG_WAITALL) && (msg.msg_flags & (MSG_TRUNC | MSG_CTRUNC))) {
out_free:
req_set_fail(req); req_set_fail(req);
} }
__io_req_complete(req, issue_flags, ret, io_put_kbuf(req)); __io_req_complete(req, issue_flags, ret, io_put_kbuf(req));
return 0; return 0;
} }
...@@ -8933,10 +8932,9 @@ static void io_mem_free(void *ptr) ...@@ -8933,10 +8932,9 @@ static void io_mem_free(void *ptr)
static void *io_mem_alloc(size_t size) static void *io_mem_alloc(size_t size)
{ {
gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP | gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP;
__GFP_NORETRY | __GFP_ACCOUNT;
return (void *) __get_free_pages(gfp_flags, get_order(size)); return (void *) __get_free_pages(gfp, get_order(size));
} }
static unsigned long rings_size(unsigned sq_entries, unsigned cq_entries, static unsigned long rings_size(unsigned sq_entries, unsigned cq_entries,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment