Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp376043lqh; Fri, 31 May 2024 04:19:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVonLFW+cuKpiCLz71uKscLyJ2Ou0+m1JguwA+L0qsaH0mTqerTYqIWbD6jH9GvlCPBpZzRrOxdsNTlXVBv8mIPiOmGSp8fLyvDrmLzPg== X-Google-Smtp-Source: AGHT+IGPZaA8MyRaC6FwAFXQ88AZu68I9+bwpRmpgPswqfe5ynmCKBNpqFNEa5S32WDdVIMmmthQ X-Received: by 2002:a05:6808:215:b0:3c7:df4:8fb2 with SMTP id 5614622812f47-3d1e34a29eemr1477410b6e.33.1717154366699; Fri, 31 May 2024 04:19:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717154366; cv=pass; d=google.com; s=arc-20160816; b=JgzGoeXF0W/kI0/mJrkTUQvo7qwDUrrHSNuaLfcLJ7bvrzM78SVQaN5hF7K6iGBhep CBO1OaK7Ac3drixm7CfhhLuawulexulWLOzCwUP41EAlWvOBQYKnBszFCPYBdavaK64I tcc7KnkY9eNBDfs0DlRl83MvrNmGaAofygj4/356EOROSdtfQxDavbRD3NJaroBKCwSx HhuohhhGx1G1dBh0WSWI2E420TD3gmAR1lacmYR/fOyprEDrDDn8PniOyP+2xfQ3MElD 6mj3vudCRSkKnkgeWAJqVlfI2+uhS702vo5kc03IyaFCBQHkA+YJMUKSmT1G6oFqBeBM Tnsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :dkim-signature:dkim-signature:from; bh=Gg5kXcNItII0NND8kK9pn3ikGOMtck74sx9fP8TYj4E=; fh=G3VEmuLGnB82GJdLGLWHvhYSqXZQvQDUZ89LfAX3Jlo=; b=VKYGsIccD2r/T0XxIa7diRNXnHOPqbZQW54xiDf2nxQuqAA3JgqYzz8hZ2JF0Ns1sg wRoHmsrL5qto8mJ4x+dVrBIvNB3K/AddLa3p8VyCl9yUQSeuNsx7g5OdzdB0hToWnwB+ GP0rq4SgxSbYkPfDDn8QXu5/wlDhg3ZJUpQ/a0VEFQBeWWVjqltJ4wW+so/rTFD12Hu4 DxEsO3ucMiC03psOxhC+Ja43bYP/trsxMgePkLuiLSXOxF8Gt5wZxW8Gt/CTv7FPy0KE ZJBpdB9KTrCQEZKkrs8LMyel+8wRo2CuvgQAYZVTNFUqPNDDJ30q5Q7R/9hiievaBleQ 6RTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ReRNTpjX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-196724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b4168aesi17344976d6.349.2024.05.31.04.19.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 04:19:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ReRNTpjX; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-196724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B4AF1C231B0 for ; Fri, 31 May 2024 11:19:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C27015748E; Fri, 31 May 2024 11:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ReRNTpjX"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="yTfFt3rd" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF9FA15575A; Fri, 31 May 2024 11:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717154352; cv=none; b=hMrBl2ZEauGbaIpiLinGPZhWux7IjcFqy92YMiGeaV4qCMOz2RJ+ibBmbA/9hAruomOF4pYJKBP01PRcCi6NN2psmgojgNW7w6Mpq1OVnJ9gKolopmv8wGMjah+O75092e2kZwjFtzDFuj909WQ5HT0EQfktdOi+ieTvCpMvl18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717154352; c=relaxed/simple; bh=9KURT/k6eiriUv4zVPiPKQ5OhmZpsba3EOFWhOZ3Jiw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TmCBio0m01OOryjJjERO/ep5cU3UtgsyTjgpe8gkFGTe11U9Akg3l6Cx5A0nO6fAbAjaoejqMoAVrTi4qEG1xQip5dJdifcQU2uqPTIM4b3468A3DDZz9R+oYE2+teTx80BY9G8rAd7fiYor6WaZEMAV6DsiomgleU4THaZIzBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ReRNTpjX; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=yTfFt3rd; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1717154349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Gg5kXcNItII0NND8kK9pn3ikGOMtck74sx9fP8TYj4E=; b=ReRNTpjXGoViRcZYHgpYP/Y//Jzigp89VPQVts7CDiSFFi4TlaQqLBKOqCFn9cp0x0EM4m ixHZ9p38ird7j52KgL10bwnczU+fRjpbXi1zC24ar6qae9kgOqk89EtNaGmKraK5rBKInw HO9L3gMjbvk+U3ccO0N3eRHErRi4ZQ4IiX6QigQ3ZoCy+fgqwPxeJej54m2Ief0s8sjgu7 TXWKT3/7/T3BxzKk/MR+tfv+doDZOw1IG2Sly0e2i1flmTCIur/VoL1A70jsmNjwFa4Flw seqm9L/j9n82ilh1gwl/mpbmGbJ6GwWhRwowcq4YYuIxj3jJT8DZS/H+hKd4Hw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1717154349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Gg5kXcNItII0NND8kK9pn3ikGOMtck74sx9fP8TYj4E=; b=yTfFt3rd46yAqosr5zROrK69s+nB58/pBhwvPOY1ZQXd353zL/9or80VVLoVBsO/Xnpa8w W82UfFQYPfI58wBg== To: Bjorn Helgaas , Rob Herring , Lizhi Hou , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lukas Wunner , Nam Cao Subject: [PATCH 0/2] PCI: of_property: Gracefully handle bridges without secondary bus Date: Fri, 31 May 2024 13:18:58 +0200 Message-Id: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, Some functions in of_property.c assume that bridges have subordinate bus. This may not be true if we run out of bus number. This series adds safety check in case bridges have no subordinate bus. Nam Cao (2): PCI: of_property: Fix NULL pointer defererence in of_pci_prop_bus_range() PCI: of_property: Fix NULL pointer defererence in of_pci_prop_intr_map() drivers/pci/of_property.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.39.2