Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4474661ybl; Tue, 21 Jan 2020 21:48:31 -0800 (PST) X-Google-Smtp-Source: APXvYqyxZUr7/DdgsI4q89t4vN8K71njxtLGkY/oh4ybDe+hEQc9X79SW5ETp/KuFDfv2PR/xn1/ X-Received: by 2002:aca:be57:: with SMTP id o84mr5834229oif.138.1579672111425; Tue, 21 Jan 2020 21:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579672111; cv=none; d=google.com; s=arc-20160816; b=AaJ7eaDxjuT87aXMfT/kX0rMejRiQKKuAfvpW8nx9wlozYQSJdxsoyzKEPgNv9iZVu OqfBFjOE3RG+mfQRuEVOXk00X4Mq0/QWH3mtdUauKXTqgq1xazOn12dbT8V3+kNK9xZm dZ+RVU8QhK51MHOjSkW4cUTiUa17kUGCsSPKndRTf8s/eaQriaf1zNwXqQNNHbU8QF/9 f4QZJelvd7bisfVCTzN1c1e3+0ssP5F4MOjd3dBnb9reweFFOGuJBxexVLT/JTZIJ7v9 pFQHntx7DipeLdd1qE3pkAMqYmt8XediYYdo3FcJnjZDUfo0YHNLHvkNU53MnWbWRg/r 10Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc; bh=GBmHlYtdmVBqAjgdjAl7xWlWpTzUFOcF+GsVUxO/jr0=; b=hjaEYjGVqFMUikZi3PfSLY8U3nGLLlfNhWIJhhhzARS3nlnK7k8W0/QuSbC3Gn1fE9 hU3Fz/+ny5XLjJ1ATAw4IW8lMOy1Z7jQUF5m1TVtacD0qBUt1FWnjurVi8dfwJ36kQM4 fxCHkUCxiWpPF5Lzv441wLxcVtLZVy5Ukvjs1JRVswjuS9vuS9fnc85O46GRXq4oZFY4 a0kqok7zqfJJ8pMf9nBM7xLBNB7eIkUEZF1HmJlUrCdKgm7kKJDxv9U41gHxJNHeb/WO rAS2vksBAELlUm3tqCI9pQX18dtbOUKxOWTolGIR9O2vGZ68nN9MGXaQII77C9fZZi42 QwZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si18835134oiz.237.2020.01.21.21.48.19; Tue, 21 Jan 2020 21:48:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725943AbgAVFpO (ORCPT + 99 others); Wed, 22 Jan 2020 00:45:14 -0500 Received: from mga12.intel.com ([192.55.52.136]:40212 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgAVFpN (ORCPT ); Wed, 22 Jan 2020 00:45:13 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 21:45:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,348,1574150400"; d="scan'208";a="215793095" Received: from allen-box.sh.intel.com (HELO [10.239.159.138]) ([10.239.159.138]) by orsmga007.jf.intel.com with ESMTP; 21 Jan 2020 21:45:11 -0800 Cc: baolu.lu@linux.intel.com, Joerg Roedel , David Woodhouse , stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/vt-d: call __dmar_remove_one_dev_info with valid pointer To: Jerry Snitselaar , iommu@lists.linux-foundation.org References: <20200122003426.16079-1-jsnitsel@redhat.com> From: Lu Baolu Message-ID: Date: Wed, 22 Jan 2020 13:43:43 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200122003426.16079-1-jsnitsel@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/22/20 8:34 AM, Jerry Snitselaar wrote: > It is possible for archdata.iommu to be set to > DEFER_DEVICE_DOMAIN_INFO or DUMMY_DEVICE_DOMAIN_INFO so check for > those values before calling __dmar_remove_one_dev_info. Without a > check it can result in a null pointer dereference. This has been seen > while booting a kdump kernel on an HP dl380 gen9. > > Cc: Joerg Roedel > Cc: Lu Baolu > Cc: David Woodhouse > Cc: stable@vger.kernel.org # 5.3+ > Cc: linux-kernel@vger.kernel.org > Fixes: ae23bfb68f28 ("iommu/vt-d: Detach domain before using a private one") > Signed-off-by: Jerry Snitselaar Acked-by: Lu Baolu Best regards, baolu