This is a note to let you know that I've just added the patch titled io_uring: kill goto error handling in io_sqpoll_wait_sq() to the 5.10-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-kill-goto-error-handling-in-io_sqpoll_wait_sq.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Wed Nov 16 09:43:39 AM CET 2022 Date: Wed, 16 Nov 2022 09:43:39 +0100 To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> From: Jens Axboe <axboe@xxxxxxxxx> Subject: io_uring: kill goto error handling in io_sqpoll_wait_sq() From: Jens Axboe <axboe@xxxxxxxxx> Hunk extracted from commit 70aacfe66136809d7f080f89c492c278298719f4 upstream. If the sqpoll thread has died, the out condition doesn't remove the waiting task from the waitqueue. The goto and check are not needed, just make it a break condition after setting the error value. That ensures that we always remove ourselves from sqo_sq_wait waitqueue. Reported-by: Xingyuan Mo <hdthky0@xxxxxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/io_uring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -9038,7 +9038,7 @@ static int io_sqpoll_wait_sq(struct io_r if (unlikely(ctx->sqo_dead)) { ret = -EOWNERDEAD; - goto out; + break; } if (!io_sqring_full(ctx)) @@ -9048,7 +9048,6 @@ static int io_sqpoll_wait_sq(struct io_r } while (!signal_pending(current)); finish_wait(&ctx->sqo_sq_wait, &wait); -out: return ret; } Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-5.10/dmaengine-at_hdmac-fix-concurrency-problems-by-removing-atc_complete_all.patch queue-5.10/x86-cpu-restore-amd-s-de_cfg-msr-after-resume.patch queue-5.10/dmaengine-at_hdmac-start-transfer-for-cyclic-channels-in-issue_pending.patch queue-5.10/dmaengine-at_hdmac-don-t-start-transactions-at-tx_submit-level.patch queue-5.10/mips-jump_label-fix-compat-branch-range-check.patch queue-5.10/dmaengine-at_hdmac-fix-at_lli-struct-definition.patch queue-5.10/cert-host-tools-stop-complaining-about-deprecated-openssl-functions.patch queue-5.10/dmaengine-at_hdmac-fix-descriptor-handling-when-issuing-it-to-hardware.patch queue-5.10/alsa-usb-audio-add-dsd-support-for-accuphase-dac-60.patch queue-5.10/mmc-sdhci_am654-fix-sdhci_reset_all-for-cqhci.patch queue-5.10/dmaengine-at_hdmac-free-the-memset-buf-without-holding-the-chan-lock.patch queue-5.10/dmaengine-at_hdmac-fix-concurrency-over-the-active-list.patch queue-5.10/alsa-hda-fix-potential-memleak-in-add_widget_node.patch queue-5.10/io_uring-kill-goto-error-handling-in-io_sqpoll_wait_sq.patch queue-5.10/dmaengine-at_hdmac-fix-premature-completion-of-desc-in-issue_pending.patch queue-5.10/alsa-hda-hdmi-enable-runtime-pm-for-more-amd-display-audio.patch queue-5.10/dmaengine-at_hdmac-fix-impossible-condition.patch queue-5.10/btrfs-selftests-fix-wrong-error-check-in-btrfs_free_dummy_root.patch queue-5.10/alsa-hda-ca0132-add-quirk-for-evga-z390-dark.patch queue-5.10/nilfs2-fix-use-after-free-bug-of-ns_writer-on-remount.patch queue-5.10/mms-sdhci-esdhc-imx-fix-sdhci_reset_all-for-cqhci.patch queue-5.10/vmlinux.lds.h-fix-placement-of-.data..decrypted-section.patch queue-5.10/udf-fix-a-slab-out-of-bounds-write-bug-in-udf_find_entry.patch queue-5.10/dmaengine-at_hdmac-check-return-code-of-dma_async_device_register.patch queue-5.10/dmaengine-at_hdmac-don-t-allow-cpu-to-reorder-channel-enable.patch queue-5.10/alsa-hda-realtek-add-positivo-c6300-model-quirk.patch queue-5.10/mm-memremap.c-map-fs_dax-device-memory-as-decrypted.patch queue-5.10/dmaengine-at_hdmac-fix-concurrency-over-descriptor.patch queue-5.10/can-j1939-j1939_send_one-fix-missing-can-header-initialization.patch queue-5.10/dmaengine-at_hdmac-protect-atchan-status-with-the-channel-lock.patch queue-5.10/mmc-sdhci-esdhc-imx-convert-the-driver-to-dt-only.patch queue-5.10/drm-i915-dmabuf-fix-sg_table-handling-in-map_dma_buf.patch queue-5.10/nilfs2-fix-deadlock-in-nilfs_count_free_blocks.patch queue-5.10/platform-x86-hp_wmi-fix-rfkill-causing-soft-blocked-wifi.patch queue-5.10/alsa-usb-audio-add-quirk-entry-for-m-audio-micro.patch queue-5.10/dmaengine-at_hdmac-fix-completion-of-unissued-descriptor-in-case-of-errors.patch queue-5.10/arm64-efi-fix-handling-of-misaligned-runtime-regions-and-drop-warning.patch queue-5.10/ata-libata-scsi-fix-synchronize-cache-16-command-failure.patch queue-5.10/dmaengine-at_hdmac-do-not-call-the-complete-callback-on-device_terminate_all.patch queue-5.10/mmc-sdhci-of-arasan-fix-sdhci_reset_all-for-cqhci.patch queue-5.10/net-tun-call-napi_schedule_prep-to-ensure-we-own-a-napi.patch queue-5.10/mmc-sdhci-tegra-fix-sdhci_reset_all-for-cqhci.patch queue-5.10/mmc-cqhci-provide-helper-for-resetting-both-sdhci-and-cqhci.patch