Re: [PATCH] USB: cdc-acm: fix racy TIOCMIWAIT implementation

From: Oliver Neukum

Date: Tue Sep 08 2026 - 03:02:55 EST




On 07.09.26 15:03, Johan Hovold wrote:
On Mon, Sep 07, 2026 at 02:46:16PM +0200, Oliver Neukum wrote:


We could do that and it would indeed be simpler.

But it would change the semantics so that past status changes
no longer show up in TIOCMIWAIT. Is that really a good idea?

Yes, as the current behaviour is both non-standard and inconsistent.

If you have multiple tasks waiting waiting on status change, then only
one of them will detect it, for example.

And if there are multiple changes (before or during TIOCMIWAIT) events
may be lost too.

Very well. Ample reasons. Do you have a patch or do you want me to fix it?

Regards
Oliver