From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f175.google.com ([209.85.220.175]:46241 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753867AbeAIUX3 (ORCPT ); Tue, 9 Jan 2018 15:23:29 -0500 Received: by mail-qk0-f175.google.com with SMTP id l12so19830271qke.13 for ; Tue, 09 Jan 2018 12:23:29 -0800 (PST) Subject: Re: Regression: NULL pointer dereference caused by iproc_pcie_map_dma_ranges To: Lorenzo Pieralisi , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Oza Oza , Bjorn Helgaas , Scott Branden , Linux PCI , bcm-kernel-feedback-list , Jon Mason , Hauke Mehrtens References: <6707e532-7a5e-261c-4d5b-950d0ccc8f66@broadcom.com> <20180109155403.GB16285@red-moon> From: Ray Jui Message-ID: <8dc3b50d-799b-9019-88a6-400b3f434bc4@broadcom.com> Date: Tue, 9 Jan 2018 12:23:23 -0800 MIME-Version: 1.0 In-Reply-To: <20180109155403.GB16285@red-moon> Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-pci-owner@vger.kernel.org List-ID: Hi Lorenzo/Rafal, A fix patch has been sent out to Bjorn and linux-pci. Regards, Ray On 1/9/2018 7:54 AM, Lorenzo Pieralisi wrote: > On Tue, Jan 02, 2018 at 11:00:43PM +0100, Rafał Miłecki wrote: >> On 2 January 2018 at 19:44, Ray Jui wrote: >>> Can you please give the following patch a try to see if that fixes the >>> issue? Thanks. >> >> It does, thank you! >> >> >>> From f91de124bc8fb5645d7dbbfd68a9a68617955749 Mon Sep 17 00:00:00 2001 >>> From: Ray Jui >>> Date: Tue, 2 Jan 2018 10:36:03 -0800 >>> Subject: [PATCH] PCI: iproc: Fix NULL pointer dereference for BCMA >>> >>> With the inbound DMA mapping supported added, the iProc PCIe driver >>> parses DT property "dma-ranges" through call to >>> "of_pci_dma_range_parser_init". In the case of BCMA, this results in a >>> NULL pointer deference due to a missing of_node. >>> >>> Fix this by adding a guard in pcie-iproc-platform.c to only enable the >>> inbound DMA mapping logic when DT property "dma-ranges" is present >>> >>> fixes: dd9d4e7498de3 ("PCI: iproc: Add inbound DMA mapping support") >>> Signed-off-by: Ray Jui >> >> Please add: >> Tested-by: Rafał Miłecki >> Cc: stable@vger.kernel.org # 4.10+ > > FYI, if you want the patch to be applied please post it on linux-pci > in a separate thread. > > Thanks, > Lorenzo >