Re: [PATCH] usb: cdc-wdm: fix double submission of URB

From: Oliver Neukum

Date: Thu Dec 03 2026 - 05:02:29 EST




On 03.12.26 10:21, Timo Joannin wrote:
Yes I believe we can divorce testing and setting the bit
in service_outstanding_interrupt(). I verified and every
path entering service_outstanding_interrupt() holds
the desc->iuspin lock throughout the test_bit(),
desc->resp_count decrement and the set_bit() sequence.
And every other path that sets WDM_RESPONDING (wdm_int_callback()
and wdm_rxwork()) also holds desc->iuspin.

Does that seem valid to you, or did you refer to another path?
Hi,

OK, that is valid. But it is not obvious to a casual reader.
Could you add a comment stating that we are protected by
the spinlock and resubmit?

Regards
Oliver