From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D961B28136F for ; Tue, 14 Apr 2026 01:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776128465; cv=none; b=Bp8b91Q98IOcLqg/K5wUOepp7TZMbphbPR5MwQrAAVURFMt8oIQFkIpioycn9FqUxyxzIiZ/+rr0lV/OKprMPtLc+ID7aJV4z827y8YtaIWKWnA2FfV2f8buLvR+dZSwdaIhkHZHDTIiXWPoS4ZC/t0QEjLZjRoGfz/fRYXD6tY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776128465; c=relaxed/simple; bh=Jgh8JGtMuLPuc0fjWZmvaREZhlmPxFCuZkpbNI589XE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FgJjOyxMvJClV2SsppTtuyLbCGraEP+nyluW4AaJcqNp7VDZxqSErpE9gQgMd59ywPbrsTI7d5NnTAux2jLXbPdKnJU8tIMl55rl18Aw8MOEwKv+oZqJ/8bx5euTPXPM42cr/bGNOw87SlnI1CDj+YW21K4CAleNVFk3pMe2XMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=adrianwowk.com; spf=pass smtp.mailfrom=adrianwowk.com; dkim=pass (2048-bit key) header.d=adrianwowk.com header.i=@adrianwowk.com header.b=egesS+I3; arc=none smtp.client-ip=209.85.210.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=adrianwowk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=adrianwowk.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=adrianwowk.com header.i=@adrianwowk.com header.b="egesS+I3" Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-7d556c1a79eso6866186a34.3 for ; Mon, 13 Apr 2026 18:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adrianwowk.com; s=google; t=1776128463; x=1776733263; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dWl3rPpOGMjT1OIH94kOV5+0jR8Ovo4+agJ500Odb3k=; b=egesS+I3CRbcvFN2B+fJ1ROHFXKWdGS10QzjZPc2eeHaTfrH3X7/+khgXd5XCgYC3d veioIRkcd0gXntW7pOI7Qr4/Nn8uP0ZuXMkeGm7IG8EdsGTQhNbOSHytJVpGjWQpxo/x F48NWGmBDUgMXQuXo8p9drPSHTXqsIvM2tAGhL4hORaS60gxeisV3wVGdF7riPncsIll xxnf+FoOkoDOl7MZ1Jt3r2MotlKRIWkTi2IA1SRJFPO1h+x5oXyUh1HTvfdpcf1aTSjZ QK/DLZxqwF8pQx3XZUgT5LPB7WByXztpiR3MN4ZtAOLoF7L89tG6PiYOci/dHWD+VD+J MrBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776128463; x=1776733263; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dWl3rPpOGMjT1OIH94kOV5+0jR8Ovo4+agJ500Odb3k=; b=QcPD2DmzEb4bkC4Ytuj/xmKi89A+q8Swv/VEHs+MXVxRp+g63Rk41tmb6pYn5HO1LW X3DI2uqja1aKmQStcfi14XT5KQpCFSXJLXio+Er0NF5E/1aUSesbORbjEFaZLyhgr6Iv 2GxasCUPGGs8C5ZQgoezuXKFh02LWVw5+7U9LgVQvSU/ZyMf7i1GHLBl9Iar1qyKNvCj L1+kZoe7nv0Z6cFC4iLG5RhNHxBYLBZ2o+XimZqa1xI/0GqUeA9y6mFnCTsNuDusl1sf U3Sar+WWnKf0Q7PmcSCdMAkH+1nP/4pHmCd9IQXoRQjqj5XWXwMN01AvBP0hQlq/b/SW bX4g== X-Forwarded-Encrypted: i=1; AFNElJ8bSxNV7Li2e9QnFOsEHxIuaFxgMS17U8n4CWZnos+fFgXMXX8TtuzEW2gK3w9NECsPCWYaA+zjM3gCad8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5h2Cq9mjamDuL55Yk55JarWqHR+BCRSuzAGNVCUST3Kdkz/nx OIhBddH8ToZOX0mwpwkO56GHk+AdXlLxI5o/cJddYe5lUOBlYieu0q4wactKXK71A2M= X-Gm-Gg: AeBDiesIYX/I8r/kAoZmNpGBsgJb9AC9k9aHOvhLzQiBrFkPUQcwdGJjaCGDg5hkYW3 CLPs3ytDKmdJmTU7K5OmZnoUaEvDJTfqZyI0s+DwvR5t1cPAVEdYL11mnaZ4438AwuGeZZn9IHs o8FqhOAzL3NSGmaeymCMFM8NiapWF8dNMogxf4WkIhJPUcyEUbeBFgAriUTQvP3WrBv9N03SWaY POL/ODolGDgD9ho03ZpTF9ki46VeNlzmdzkLIFsyArVfUXDbru3BY8d/gdbmkLVMeNK4oLhJnos Gp49hVWUKiEHw6oTm44eN+NIC9aZpGwBd12W2MOw84ALW1ROtz4KHeh23s/mPr07SWMfFot9XFe Zn2492hp4d+HsHieVKT0i75bIzTmCcR+rUuMGhd+ROHjmfIZiZxJ5KpbnRWn/qLVzzvT9k+5CFh NzUkEdzZWgzc3hyEbyqD6LkTfa+h914nYgKsi+MVhWHA== X-Received: by 2002:a05:6830:411c:b0:7d7:ecf8:6b with SMTP id 46e09a7af769-7dc27c67914mr8164751a34.2.1776128462835; Mon, 13 Apr 2026 18:01:02 -0700 (PDT) Received: from linux-dev ([12.26.11.218]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7dc269d3255sm9964556a34.25.2026.04.13.18.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2026 18:01:02 -0700 (PDT) From: Adrian Wowk To: 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, Adrian Wowk Subject: [PATCH 2/2] usbip: vhci_hcd: reduce CONFIG_USBIP_VHCI_NR_HCS upper bound to 32 Date: Mon, 13 Apr 2026 20:00:50 -0500 Message-ID: <20260414010050.158064-3-dev@adrianwowk.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260414010050.158064-1-dev@adrianwowk.com> References: <20260414010050.158064-1-dev@adrianwowk.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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 -- 2.53.0