Commit b78c7dc
xhci: fix memory leak regression when freeing xhci vdev devices depth first
commit edcbe06 upstream.
Suspend-resume cycle test revealed a memory leak in 6.17-rc3
Turns out the slot_id race fix changes accidentally ends up calling
xhci_free_virt_device() with an incorrect vdev parameter.
The vdev variable was reused for temporary purposes right before calling
xhci_free_virt_device().
Fix this by passing the correct vdev parameter.
The slot_id race fix that caused this regression was targeted for stable,
so this needs to be applied there as well.
Fixes: 2eb0337 ("usb: xhci: Fix slot_id resource race conflict")
Reported-by: David Wang <[email protected]>
Closes: https://lore.kernel.org/linux-usb/[email protected]
Suggested-by: Michal Pecio <[email protected]>
Suggested-by: David Wang <[email protected]>
Cc: [email protected]
Tested-by: David Wang <[email protected]>
Signed-off-by: Mathias Nyman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 7dc3bd0 commit b78c7dc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
| 965 | + | |
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
| |||
0 commit comments