Re: [PATCH] usb: core: Emit KOBJ_CHANGE on unbound interface

From: Oliver Neukum

Date: Wed Oct 21 2026 - 04:02:23 EST


Good morning,

On 13.10.26 18:48, Fabien Sanglard wrote:

That said, unifying the behavior upon reset would be elegant. My main
concern is whether some existing udev rules or netlink listeners in
user space might break if we generalize this behavior and start
emitting unexpected CHANGE events for interfaces that successfully
rebound (which already emit UNBIND -> BIND).

On a generic note, it seems to me that you are concerned about
an unavoidable case. You can check whether an interface is
unclaimed. Yet you have no way to ensure that the result of
your check is still current and thus valid, at time you act
upon it.

In other words, you were about to design an interface that is
inherently racy. That is not a good idea.
If you really, really need to avoid it, you'd have to define
a new type of event.

Regards
Oliver