Patch "io_uring/poll: clear single/double poll flags on poll arming" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/poll: clear single/double poll flags on poll arming

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-poll-clear-single-double-poll-flags-on-poll-arming.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 005308f7bdacf5685ed1a431244a183dbbb9e0e8 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@xxxxxxxxx>
Date: Mon, 27 Mar 2023 19:56:18 -0600
Subject: io_uring/poll: clear single/double poll flags on poll arming

From: Jens Axboe <axboe@xxxxxxxxx>

commit 005308f7bdacf5685ed1a431244a183dbbb9e0e8 upstream.

Unless we have at least one entry queued, then don't call into
io_poll_remove_entries(). Normally this isn't possible, but if we
retry poll then we can have ->nr_entries cleared again as we're
setting it up. If this happens for a poll retry, then we'll still have
at least REQ_F_SINGLE_POLL set. io_poll_remove_entries() then thinks
it has entries to remove.

Clear REQ_F_SINGLE_POLL and REQ_F_DOUBLE_POLL unconditionally when
arming a poll request.

Fixes: c16bda37594f ("io_uring/poll: allow some retries for poll triggering spuriously")
Cc: stable@xxxxxxxxxxxxxxx
Reported-by: Pengfei Xu <pengfei.xu@xxxxxxxxx>
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 io_uring/poll.c |    1 +
 1 file changed, 1 insertion(+)

--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -742,6 +742,7 @@ int io_arm_poll_handler(struct io_kiocb
 	apoll = io_req_alloc_apoll(req, issue_flags);
 	if (!apoll)
 		return IO_APOLL_ABORTED;
+	req->flags &= ~(REQ_F_SINGLE_POLL | REQ_F_DOUBLE_POLL);
 	req->flags |= REQ_F_POLLED;
 	ipt.pt._qproc = io_async_queue_proc;
 


Patches currently in stable-queue which might be from axboe@xxxxxxxxx are

queue-6.1/io_uring-fix-poll-netmsg-alloc-caches.patch
queue-6.1/io_uring-rsrc-fix-rogue-rsrc-node-grabbing.patch
queue-6.1/io_uring-poll-clear-single-double-poll-flags-on-poll-arming.patch
queue-6.1/loop-loop_configure-send-uevents-for-partitions.patch
queue-6.1/block-io_uring-pass-in-issue_flags-for-uring_cmd-task_work-handling.patch
queue-6.1/blk-mq-fix-bad-unlock-balance-detected-on-q-srcu-in-.patch
queue-6.1/blk-mq-move-the-srcu_struct-used-for-quiescing-to-th.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux