From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FA53C43461 for ; Mon, 7 Sep 2020 17:31:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5B94206E6 for ; Mon, 7 Sep 2020 17:31:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WjwNtiwZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=dionne-riel-com.20150623.gappssmtp.com header.i=@dionne-riel-com.20150623.gappssmtp.com header.b="jrwGfytV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5B94206E6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dionne-riel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mhWbzNWTCPxT9aGADecRTR1jtq2AVbKgEo5TIt5nLlU=; b=WjwNtiwZhJdjjZ+shWy2V+exz sQtIISaqi0L5s2zecBSyCVRK2QdQAZ4ojXu9M9X3DkRxz/SFuCOW5BAZrv8bayxADgfENNq55tFKH 8j8YOY7mQsWYnSmoT+Etj9kUVL+vzh5UaJweLMDLEkN9pEtKS7c6VTqObz/BK2rcIs07JCGGYTVQl BcQs8SRKizuOPcNqH0gBSEoNbRaDtvok33TftNd/V5hZ/wmYuL4lfmDBNW1qstWRWt74fs5E4swSz 8IWcNGpd6kg22PP1IYkIIGXA8x07PqdJorPAKNDXwVE3a2OiyBH7YGPhv4FTbt2iHRIOVXJTMnx1d f4JOdJ4zA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFKxU-0008Vx-GJ; Mon, 07 Sep 2020 17:29:36 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFKxR-0008V9-HV for linux-arm-kernel@lists.infradead.org; Mon, 07 Sep 2020 17:29:34 +0000 Received: by mail-qk1-x741.google.com with SMTP id 16so3823786qkf.4 for ; Mon, 07 Sep 2020 10:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dionne-riel-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O3kwXj89Yh9dEdlh52K/qRxoxl+rESWZenHBVCslYH8=; b=jrwGfytVrcuygqGHIER9iz2wPV/g6TUHZ6ZHbWFNgrYNCzV7n075KCgcuqM87ufZNp gu+r7Ec5zpTtx3JtnTPx11Oal010u4mKgrt5l7aWarknkPffdhRksqsB6VG0TKA1zowF VFv28I0TVj5md2YV8nLqXkq6JVcUJgtxnTbfO/AbRaIzNllC3HRk8jfnvOTA0jMlWa2q O3GAokfHCL6209TmrnbODA2KdumhvzkPYHYYnqFcsEWNi+2fjZKxHDW4u6raQvRFYpL7 Z/p3+vJA/Qpc/0kvOcBZosaQzZ6JsShzVH5y7Wk3W69ZueOsYCUypPWns/LB2DzeNFOG 7jPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O3kwXj89Yh9dEdlh52K/qRxoxl+rESWZenHBVCslYH8=; b=ovPsEktqXd+7HLtTyxs3cZvqaX8J8UnCwEax9KWYBywWZ7nSDfJktISlyzGu04ktCZ d7DOJ7rkaTAkHw1f1gJASHCzE92ayBiqTZL0/iO/K9CTpfMEHitzSXXttwRZSV7iqZnY f9UfbYiAiA4WoKblr1vlRe69ja7EnYvlRn5lpg424x5xK5pvpN6i2t2gwchK0R+s4xUU 9JNCvYcpzN2TwxxhT+ExML+jhUXKceTyb2csWaelbqSIl6NBzfFsp7XxgKvn2Wd2gMYv viv9n6wMHBAhIigLPBoLuGxXi9J65mBpxp+H5ap5/ydJPYqqGn0PLXDCSNwRwuDIEMtp CBug== X-Gm-Message-State: AOAM532hU9i++PSkZfAjjcWqm1HnX9EO0nd9oAWGAczUgsyn1kAeujaY aBWuxlTFlm23J84fyKRRmxve/w== X-Google-Smtp-Source: ABdhPJw33XS5uaiOB/0gMwFN0ZG5DEyUAcgxGf6NM84ZW49PWTXHcRhsszMplWr32J5FujnTlCrTYA== X-Received: by 2002:ae9:f306:: with SMTP id p6mr18636285qkg.104.1599499769017; Mon, 07 Sep 2020 10:29:29 -0700 (PDT) Received: from DUFFMAN (135-23-195-85.cpe.pppoe.ca. [135.23.195.85]) by smtp.gmail.com with ESMTPSA id y1sm11793217qti.40.2020.09.07.10.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 10:29:28 -0700 (PDT) Date: Mon, 7 Sep 2020 13:29:26 -0400 From: Samuel Dionne-Riel To: Lorenzo Pieralisi Subject: Re: [PATCH] PCI: rockchip: Fix bus checks in rockchip_pcie_valid_device() Message-ID: <20200907132926.27d0da14@DUFFMAN> In-Reply-To: <20200907102016.GH6428@e121166-lin.cambridge.arm.com> References: <20200904140904.944-1-lorenzo.pieralisi@arm.com> <20200907102016.GH6428@e121166-lin.cambridge.arm.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200907_132933_674410_B4BB7EFB X-CRM114-Status: GOOD ( 22.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Shawn Lin , linux-arm-kernel@lists.infradead.org, Rob Herring Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 7 Sep 2020 11:20:16 +0100 Lorenzo Pieralisi wrote: > On Fri, Sep 04, 2020 at 03:09:04PM +0100, Lorenzo Pieralisi wrote: > > The root bus checks rework in: > > > > commit d84c572de1a3 ("PCI: rockchip: Use pci_is_root_bus() to check > > if bus is root bus") > > > > caused a regression whereby in rockchip_pcie_valid_device() if > > the bus parameter is the root bus and the dev value == 0 the > > function should return 1 (ie true) without checking if the > > bus->parent pointer is a root bus because that triggers a NULL > > pointer dereference. > > > > Fix this by streamlining the root bus detection. > > > > Fixes: d84c572de1a3 ("PCI: rockchip: Use pci_is_root_bus() to check > > if bus is root bus") Reported-by: Samuel Dionne-Riel > > Signed-off-by: Lorenzo Pieralisi > > Cc: Bjorn Helgaas > > Cc: Rob Herring > > Cc: Shawn Lin > > --- > > drivers/pci/controller/pcie-rockchip-host.c | 11 ++++------- > > 1 file changed, 4 insertions(+), 7 deletions(-) > > Hi Samuel, > > I would kindly ask you please to test it since I changed the code, > I need your Tested-by before asking Bjorn to merge it. > Hi, I'm sorry, I had tested it, but didn't reply back as it worked. Not being familiar with the customs of the mailing list. Again, just in case, verified to work and fix the issue on top of v5.9-rc3. -- Samuel Dionne-Riel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel