From: Shuah Khan <skhan@linuxfoundation.org>
To: Adrian Wowk <dev@adrianwowk.com>,
valentina.manea.m@gmail.com, shuah@kernel.org
Cc: i@zenithal.me, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 2/2] usbip: vhci_hcd: reduce CONFIG_USBIP_VHCI_NR_HCS upper bound to 32
Date: Tue, 5 May 2026 12:15:51 -0600 [thread overview]
Message-ID: <1c8b0149-261a-447c-acd9-4ee62b74adfd@linuxfoundation.org> (raw)
In-Reply-To: <20260414010050.158064-3-dev@adrianwowk.com>
On 4/13/26 19:00, Adrian Wowk wrote:
> Each VHCI HC instance registers two USB buses (one HS, one SS).
> USB_MAXBUS in drivers/usb/core/hcd.c is hard-coded to 64, giving an
> effective maximum of 32 VHCI HC instances (32 * 2 = 64 buses).
>
> The Kconfig range for USBIP_VHCI_NR_HCS currently allows up to 128,
> which will cause probe failures for any HC instance beyond the 32nd.
> These probe failures trigger the NULL pointer dereference fixed in the
> previous commit.
>
> Reduce the upper bound to 32 to reflect the real maximum imposed by
> USB_MAXBUS. Note that probe failures can still occur below this limit
> if real hardware has already claimed enough USB bus numbers, making
> the NULL check fix necessary regardless.
>
> Signed-off-by: Adrian Wowk <dev@adrianwowk.com>
> ---
> drivers/usb/usbip/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/usbip/Kconfig b/drivers/usb/usbip/Kconfig
> index b9f94e2e278..50945b6fae1 100644
> --- a/drivers/usb/usbip/Kconfig
> +++ b/drivers/usb/usbip/Kconfig
> @@ -40,7 +40,7 @@ config USBIP_VHCI_HC_PORTS
>
> config USBIP_VHCI_NR_HCS
> int "Number of USB/IP virtual host controllers"
> - range 1 128
> + range 1 32
> default 1
> depends on USBIP_VHCI_HCD
> help
Looks good to me.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Greg, Please pick this up.
thanks,
-- Shuah
prev parent reply other threads:[~2026-05-05 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 1:00 [PATCH 0/2] usbip: vhci_hcd: fix NULL deref and NR_HCS upper bound Adrian Wowk
2026-04-14 1:00 ` [PATCH 1/2] usbip: vhci_hcd: fix NULL deref in status_show_vhci Adrian Wowk
2026-05-05 18:15 ` Shuah Khan
2026-04-14 1:00 ` [PATCH 2/2] usbip: vhci_hcd: reduce CONFIG_USBIP_VHCI_NR_HCS upper bound to 32 Adrian Wowk
2026-05-05 18:15 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c8b0149-261a-447c-acd9-4ee62b74adfd@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=dev@adrianwowk.com \
--cc=gregkh@linuxfoundation.org \
--cc=i@zenithal.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox