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
This commit is contained in:
@@ -5228,7 +5228,6 @@ static int io_recv(struct io_kiocb *req, unsigned int issue_flags)
|
||||
min_ret = iov_iter_count(&msg.msg_iter);
|
||||
|
||||
ret = sock_recvmsg(sock, &msg, flags);
|
||||
out_free:
|
||||
if (ret < min_ret) {
|
||||
if (ret == -EAGAIN && force_nonblock)
|
||||
return -EAGAIN;
|
||||
@@ -5236,9 +5235,9 @@ out_free:
|
||||
ret = -EINTR;
|
||||
req_set_fail(req);
|
||||
} else if ((flags & MSG_WAITALL) && (msg.msg_flags & (MSG_TRUNC | MSG_CTRUNC))) {
|
||||
out_free:
|
||||
req_set_fail(req);
|
||||
}
|
||||
|
||||
__io_req_complete(req, issue_flags, ret, io_put_kbuf(req));
|
||||
return 0;
|
||||
}
|
||||
@@ -8933,10 +8932,9 @@ static void io_mem_free(void *ptr)
|
||||
|
||||
static void *io_mem_alloc(size_t size)
|
||||
{
|
||||
gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP |
|
||||
__GFP_NORETRY | __GFP_ACCOUNT;
|
||||
gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO | __GFP_NOWARN | __GFP_COMP;
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user