This is a note to let you know that I've just added the patch titled Revert "usb: cdc-wdm: close race between read and workqueue" to the 6.6-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: revert-usb-cdc-wdm-close-race-between-read-and-workqueue.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 1607830dadeefc407e4956336d9fcd9e9defd810 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Thu, 18 Apr 2024 16:33:28 +0200 Subject: Revert "usb: cdc-wdm: close race between read and workqueue" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> commit 1607830dadeefc407e4956336d9fcd9e9defd810 upstream. This reverts commit 339f83612f3a569b194680768b22bf113c26a29d. It has been found to cause problems in a number of Chromebook devices, so revert the change until it can be brought back in a safe way. Link: https://lore.kernel.org/r/385a3519-b45d-48c5-a6fd-a3fdb6bec92f@xxxxxxxxxxxx Reported-by:: Aleksander Morgado <aleksandermj@xxxxxxxxxxxx> Fixes: 339f83612f3a ("usb: cdc-wdm: close race between read and workqueue") Cc: stable <stable@xxxxxxxxxx> Cc: Oliver Neukum <oneukum@xxxxxxxx> Cc: Bjørn Mork <bjorn@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/class/cdc-wdm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -485,7 +485,6 @@ out_free_mem: static int service_outstanding_interrupt(struct wdm_device *desc) { int rv = 0; - int used; /* submit read urb only if the device is waiting for it */ if (!desc->resp_count || !--desc->resp_count) @@ -500,10 +499,7 @@ static int service_outstanding_interrupt goto out; } - used = test_and_set_bit(WDM_RESPONDING, &desc->flags); - if (used) - goto out; - + set_bit(WDM_RESPONDING, &desc->flags); spin_unlock_irq(&desc->iuspin); rv = usb_submit_urb(desc->response, GFP_KERNEL); spin_lock_irq(&desc->iuspin); Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-6.6/usb-pci-quirks-handle-has_ioport-dependency-for-uhci.patch queue-6.6/alsa-hda-tas2781-correct-the-register-for-pow-calibrated-data.patch queue-6.6/thunderbolt-avoid-notify-pm-core-about-runtime-pm-resume.patch queue-6.6/serial-core-fix-missing-shutdown-and-startup-for-serial-base-port.patch queue-6.6/drm-amdkfd-fix-memory-leak-in-create_process-failure.patch queue-6.6/kvm-x86-pmu-do-not-mask-lvtpc-when-handling-a-pmi-on-amd-platforms.patch queue-6.6/comedi-vmk80xx-fix-incomplete-endpoint-checking.patch queue-6.6/drm-vmwgfx-fix-prime-import-export.patch queue-6.6/arm64-hibernate-fix-level3-translation-fault-in-swsusp_save.patch queue-6.6/usb-serial-option-add-support-for-fibocom-fm650-fg650.patch queue-6.6/net-usb-ax88179_178a-avoid-writing-the-mac-address-before-first-reading.patch queue-6.6/usb-serial-option-add-telit-fn920c04-rmnet-compositions.patch queue-6.6/drm-vmwgfx-sort-primary-plane-formats-by-order-of-preference.patch queue-6.6/usb-new-quirk-to-reduce-the-set_address-request-time.patch queue-6.6/usb-dwc2-host-fix-dereference-issue-in-ddma-completion-flow.patch queue-6.6/sched-add-missing-memory-barrier-in-switch_mm_cid.patch queue-6.6/usb-xhci-add-timeout-argument-in-address_device-usb-.patch queue-6.6/usb-pci-quirks-handle-has_ioport-dependency-for-amd-.patch queue-6.6/drm-i915-vma-fix-uaf-on-destroy-against-retire-race.patch queue-6.6/selftests-ftrace-limit-length-in-subsystem-enable-tests.patch queue-6.6/random-handle-creditable-entropy-from-atomic-process-context.patch queue-6.6/scsi-core-fix-handling-of-scmd_fail_if_recovering.patch queue-6.6/arm64-head-disable-mmu-at-el2-before-clearing-hcr_el2.e2h.patch queue-6.6/kvm-x86-mmu-write-protect-l2-sptes-in-tdp-mmu-when-clearing-dirty-status.patch queue-6.6/mm-swapops-update-check-in-is_pfn_swap_entry-for-hwpoison-entries.patch queue-6.6/serial-core-clearing-the-circular-buffer-before-nullifying-it.patch queue-6.6/usb-serial-option-add-fibocom-fm135-gl-variants.patch queue-6.6/nilfs2-fix-oob-in-nilfs_set_de_type.patch queue-6.6/drm-amdgpu-remove-invalid-resource-start-check-v2.patch queue-6.6/serial-stm32-return-irq_none-in-the-isr-if-no-handling-happend.patch queue-6.6/mm-memory-failure-fix-deadlock-when-hugetlb_optimize_vmemmap-is-enabled.patch queue-6.6/arm64-mm-modify-range-based-tlbi-to-decrement-scale.patch queue-6.6/init-main.c-fix-potential-static_command_line-memory-overflow.patch queue-6.6/mm-shmem-inline-shmem_is_huge-for-disabled-transparent-hugepages.patch queue-6.6/speakup-avoid-crash-on-very-long-word.patch queue-6.6/alsa-hda-realtek-add-quirks-for-huawei-matebook-d14-nblb-wax9n.patch queue-6.6/usb-disable-usb3-lpm-at-shutdown.patch queue-6.6/drm-vmwgfx-fix-crtc-s-atomic-check-conditional.patch queue-6.6/thunderbolt-fix-wake-configurations-after-device-unplug.patch queue-6.6/kvm-x86-snapshot-if-a-vcpu-s-vendor-model-is-amd-vs.-intel-compatible.patch queue-6.6/serial-pmac_zilog-remove-flawed-mitigation-for-rx-irq-flood.patch queue-6.6/io_uring-fix-io_cqring_wait-not-restoring-sigmask-on-get_timespec64-failure.patch queue-6.6/usb-pci-quirks-group-amd-specific-quirk-code-togethe.patch queue-6.6/usb-serial-option-add-lonsung-u8300-u9300-product.patch queue-6.6/bootconfig-use-memblock_free_late-to-free-xbc-memory-to-buddy.patch queue-6.6/arm64-tlb-fix-tlbi-range-operand.patch queue-6.6/usb-serial-option-support-quectel-em060k-sub-models.patch queue-6.6/kvm-x86-pmu-disable-support-for-adaptive-pebs.patch queue-6.6/usb-gadget-f_ncm-fix-uaf-ncm-object-at-re-bind-after-usb-ep-transport-error.patch queue-6.6/mm-userfaultfd-allow-hugetlb-change-protection-upon-poison-entry.patch queue-6.6/serial-mxs-auart-add-spinlock-around-changing-cts-state.patch queue-6.6/fs-sysfs-fix-reference-leak-in-sysfs_break_active_protection.patch queue-6.6/alsa-hda-realtek-enable-audio-jacks-of-haier-boyue-g42-with-alc269vc.patch queue-6.6/binder-check-offset-alignment-in-binder_get_object.patch queue-6.6/alsa-hda-tas2781-add-new-vendor_id-and-subsystem_id-to-support-thinkpad-ice-1.patch queue-6.6/nouveau-fix-instmem-race-condition-around-ptr-stores.patch queue-6.6/serial-stm32-reset-.throttled-state-in-.startup.patch queue-6.6/revert-usb-cdc-wdm-close-race-between-read-and-workqueue.patch queue-6.6/fuse-fix-leaked-enosys-error-on-first-statx-call.patch queue-6.6/usb-serial-option-add-rolling-rw101-gl-and-rw135-gl-support.patch queue-6.6/alsa-seq-ump-fix-conversion-from-midi2-to-midi1-ump-messages.patch queue-6.6/drm-amdgpu-validate-the-parameters-of-bo-mapping-operations-more-clearly.patch queue-6.6/sunrpc-fix-rpcgss_context-trace-event-acceptor-field.patch queue-6.6/mei-me-disable-rpl-s-on-sps-and-ign-firmwares.patch