From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753298AbcCDGNy (ORCPT ); Fri, 4 Mar 2016 01:13:54 -0500 Received: from ni.piap.pl ([195.187.100.4]:36486 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751024AbcCDGNw convert rfc822-to-8bit (ORCPT ); Fri, 4 Mar 2016 01:13:52 -0500 From: khalasa@piap.pl (Krzysztof =?utf-8?Q?Ha=C5=82asa?=) To: Bjorn Helgaas Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel Subject: Re: [PATCH] Fix NULL ptr dereference in pci_bus_assign_domain_nr() on ARM References: <20160303173522.GA9189@localhost> Date: Fri, 04 Mar 2016 07:13:49 +0100 In-Reply-To: <20160303173522.GA9189@localhost> (Bjorn Helgaas's message of "Thu, 3 Mar 2016 11:35:22 -0600") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 92340 [Mar 04 2016] X-KLMS-AntiSpam-Version: 5.5.9.33 X-KLMS-AntiSpam-Envelope-From: khalasa@piap.pl X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Moebius-Timestamps: 3994760, 3994770, 3993737 X-KLMS-AntiSpam-Info: LuaCore: 414 414 652141367f63b6038f5642fa97308d3a9d2edb46, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2016/03/03 12:58:55 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2016/03/03 21:40:00 #7309545 X-KLMS-AntiVirus-Status: Clean, skipped Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, Bjorn Helgaas writes: > On Tue, Mar 01, 2016 at 07:07:18AM +0100, Krzysztof HaƂasa wrote: >> Many ARM platforms use a wrapper: >> /* >> * Compatibility wrapper for older platforms that do not care about >> * passing the parent device. >> */ >> static inline void pci_common_init(struct hw_pci *hw) >> { >> pci_common_init_dev(NULL, hw); >> } >> >> which means that pci_bus_assign_domain_nr() can be called without >> a parent. This patch fixes the NULL pointer dereference. > > What exactly is the impact of this? Does this fix need to be in v4.5? > It sounds like it should be, but I need a little more detailed > justification, e.g., "platforms X, Y, Z don't boot at all without > this change." At least CNS3xxx doesn't boot. I haven't verified a couple of others, but they may be broken as well. -- Krzysztof Halasa Industrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland