5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zongmin Zhou <zhouzongmin@xxxxxxxxxx> commit e7cd4b811c9e019f5acbce85699c622b30194c24 upstream. The detach_port() doesn't return error when detach is attempted on an invalid port. Fixes: 40ecdeb1a187 ("usbip: usbip_detach: fix to check for invalid ports") Cc: stable@xxxxxxxxxxxxxxx Reviewed-by: Hongren Zheng <i@xxxxxxxxxxx> Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Zongmin Zhou <zhouzongmin@xxxxxxxxxx> Link: https://lore.kernel.org/r/20241024022700.1236660-1-min_halo@xxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/usb/usbip/src/usbip_detach.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/usb/usbip/src/usbip_detach.c +++ b/tools/usb/usbip/src/usbip_detach.c @@ -68,6 +68,7 @@ static int detach_port(char *port) } if (!found) { + ret = -1; err("Invalid port %s > maxports %d", port, vhci_driver->nports); goto call_driver_close;