fix(dra): skip usbip devices in discovery when vhci_hcd has not fully released them#2122
Merged
Merged
Conversation
fa24791 to
1c5a3c6
Compare
1c5a3c6 to
6224f6d
Compare
danilrwx
previously approved these changes
Mar 20, 2026
… released them Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
6224f6d to
b554d28
Compare
danilrwx
approved these changes
Mar 20, 2026
This was referenced Mar 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During USB device discovery in the DRA plugin, when a USBIP device is detached, there is a race window where the device has already been removed from the USBIP attach info (bus ID set) but is still present in sysfs — because
vhci_hcddriver has not fully released it yet.In this window, the device was incorrectly classified as a regular local USB device and published into the ResourceSlice. It was removed shortly after once
vhci_hcdreleased it, but this caused a brief flap in the ResourceSlice.The fix detects such devices by resolving the sysfs path symlink and checking whether it goes through the
vhci_hcdsubsystem. If so, the device is skipped during discovery to prevent the flap.Why do we need it, and what problem does it solve?
When a USBIP device is detached, there is a brief period during which:
vhci_hcdhas not finished cleanup.As a result, the discovery loop incorrectly published the detaching USBIP device as a local USB device into the ResourceSlice. It was immediately removed on the next reconciliation cycle, but the transient publish caused a flap — unnecessary churn in the ResourceSlice and potentially confusing state for the scheduler.
What is the expected result?
Checklist
Changelog entries