Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1089192lqo; Fri, 17 May 2024 10:15:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkAoVNCKoDR2IXU8sAXQ8M8TkqDTEpZsdAm3ojBy3mUkHWpM84bKPKARG7nmYbbLmkyL0JLMIFjmTmWXcUhxRzOrByXJF7TmvvFewmnA== X-Google-Smtp-Source: AGHT+IGLN5QGP+veCp5TzK8Sn405JOmB3BEndUUOjIC4u2NZkH1DtHceg5BkpuG/rAL9bcOxMPsc X-Received: by 2002:a17:90b:3101:b0:2ae:9a80:9065 with SMTP id 98e67ed59e1d1-2b6cc76f8f5mr19590256a91.28.1715966123803; Fri, 17 May 2024 10:15:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715966123; cv=pass; d=google.com; s=arc-20160816; b=A5Q1vBhJ0COau5mKqXbzozQic/M0jkMUwac7D8+SbF4rHMadTsxb4oMw1kvjhLREiY i9DbZw4VYtGs5/OmXA8OgGSyfcxinI12BWJtTtbATfcKVel4ieuyEipV+a6TjtZNyKOx FBboydPpjCGoKlIySVQIkdpgcvwnfcSrm1Q4uZ5QucYkNfBmj28Y2pr29XAlO3giu4Ui ajVKRBjkUutBH2kzAIJWsW4OvrXIn1xH2b5XRsWOcPvRnfjIbMZk9jP7Q/DYErdh7Ouz 7T1H2kx5mWndUHcn5Hz3a0GlBaVrQWYXcedMeVPgjkBS75snnU0H6FkVTs168XaxsI0S w+IQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=rhjqz4NmkgFX3zGkCQAyczxx+lTvdju/sgqauMmpFCg=; fh=29fgn0vhHmP7/+zlEkPj6aVodSYm/gG8mFbQA5/+Avg=; b=HEya5Wuo0SBiebx9PZ5uJdHsPIcwlY8yYsP/OfUMyl2wHLFOSghqbYy7r5Gfwi5Bp7 X3rg89QR54SOeUoprm+vh1vRQnT70gYbjdL7l72GMvo266KJ8hc8SBrs+Vdh7B11zAw4 7pxhCqhEDq32HoqMbgNMckMhP/GEvOqs/qMLzhOvl4f1HCs1HZsBt+YDprboXyxwtuJG rLCzx3I7JyBRV2FFwnzwuHrSb7p+Zt61kBoote5RImM7ZPpNDQHvdSQlgmdqKg4dTJdo MvOIDrvSd12KmWD8ALzBZaWcMgiNcaW5n6eG1Mez9TMnPkTVATLVLrWYygRj3JzAUuro SMJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea7561si19945332a91.97.2024.05.17.10.15.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:15:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-182386-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182386-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 45016B23A03 for ; Fri, 17 May 2024 17:14:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B561513DBA2; Fri, 17 May 2024 17:14:00 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 080D313DB8D; Fri, 17 May 2024 17:13:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966040; cv=none; b=YKKFJE+uGj92QL8pxt1C9E8YGq0NK1oYJfdKAijU+kta5Gw5k+5N7ZHq1YHmGkkdFrcNmbs4benMUaGO4ZnTxCFLv1rCwmi4/jSMl+79WmDFv4V1mTIdMp+oZIojAt0/wTfFl5P69+NzWiHuCwDXv5SdYPqdMSpSmUW1cDoEEDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715966040; c=relaxed/simple; bh=ZLNgLIDYm7j4h60dVaUFv95BXShlTksFuGmvjb9HuXg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ti6HE82JlVCnrBfNSZjIHqBEEGAZawCWx9a3Ojy5FBnkio8RfBkwem++C9VsXv+IDZDMLGCDAs5wygKEloKR6ls7sKPudLbCxxQXEqL4BLxWKdONs9yNvptY6ZkVU16ZlQJryeIq++41JrkSZd88PkOpe+U/U3OtDGf+ynuB6OA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ed835f3c3cso17163965ad.3; Fri, 17 May 2024 10:13:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715966038; x=1716570838; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rhjqz4NmkgFX3zGkCQAyczxx+lTvdju/sgqauMmpFCg=; b=ddwfm9wC5VYdkPCLUNtlyiujucSOsYwV2DRQc0SKBQr64qB0NduFtGTInegFmcm9w9 T118YbKBByxlznuFQuB8jCwHD0yx1ZmSB4MoGE0DqPAbvcYxg3tX8oap/Vyj8UU/rkmF RDskGWZ7HKZz9kRLF1W8DAYyrK5zT9jDHctuCy4ALe6sJrpFUQc2DFdVz/tNpRWGHmxz 1TVxXF0mC2fRaxmgB7aqYAKt8mXwLWBTqrtv7JIwTgBdoNA6QcPjCRAFbNpCrnh6NyY1 B/UR9StGb/Rl0O1RnNfe9q4sq+JakMC+ur8isssks9emG530qh7Kj3ARms/NOCjeT0k7 PO+g== X-Forwarded-Encrypted: i=1; AJvYcCVG4/OXtRghLM/YqShXItZb/Re1TJekIhcleUwkJgCiRmJysovXoyWxt93BFDlbEgNmAi8EAZulKCRxC1c1+sCzCShpkfJ3YHbuikbelCcpf48bDIPSrMh4LRQzdFBuTapMny3+yD8l X-Gm-Message-State: AOJu0YwaP4takB3umcgaxnvt88HUBca4CPgGgfP9nhChzB+44unGt43J GiGWNNvP7lpTx+8XN+K5/Z0CRStZNUlW6cYS8+urAx5UJa0hSjv0 X-Received: by 2002:a17:902:7b87:b0:1ea:9585:a1d7 with SMTP id d9443c01a7336-1ef43e293d9mr212382285ad.37.1715966038218; Fri, 17 May 2024 10:13:58 -0700 (PDT) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c2563c0sm159246945ad.287.2024.05.17.10.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:13:57 -0700 (PDT) Date: Sat, 18 May 2024 02:13:55 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Aleksandr Mishin Cc: Rob Herring , Lorenzo Pieralisi , Bjorn Helgaas , Manivannan Sadhasivam , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Serge Semin , Niklas Cassel , Yoshihiro Shimoda , Damien Le Moal , Siddharth Vadapalli , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, Bjorn Helgaas Subject: Re: [PATCH v4] PCI: dwc: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs() Message-ID: <20240517171355.GF1947919@rocinante> References: <20240329051947.28900-1-amishin@t-argos.ru> <20240505061517.11527-1-amishin@t-argos.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240505061517.11527-1-amishin@t-argos.ru> Hello, > If IORESOURCE_MEM is not provided in Device Tree due to any error, > resource_list_first_type() will return NULL and > pci_parse_request_of_pci_ranges() will just emit a warning. > This will cause a NULL pointer dereference. > Fix this bug by adding NULL return check. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. Applied to controller/dwc, thank you! [1/1] PCI: dwc: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs() https://git.kernel.org/pci/pci/c/b1d4d63d52a7 Krzysztof