Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp359838pxk; Thu, 3 Sep 2020 01:19:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5wggelw/n1N7gfmFlrdmp1UwrYWye/srkL2f85ngYz9JES3afh/bBBNsrUTmQMhXJZDoQ X-Received: by 2002:a05:6402:1386:: with SMTP id b6mr1851724edv.296.1599121169223; Thu, 03 Sep 2020 01:19:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599121169; cv=none; d=google.com; s=arc-20160816; b=cWBXU8UNsIH59WHRPS+8hE8s3OfJPqAp+tWcjz5JSAN/3vbMxNG6s0h/vvXs0l48VW ff5GytNthAn1TUd3wut42xqh+g9c9stFYWlMtf0I5oEc7AqeRhZmxn3iRU7nhSIl6rFw vqDm5QWE9l9qHECxG/bU+BC3JUhw9lGXytJQ0jReoeJp7qqffMHQkiOpWmcng6wIP2g8 UPCrLxeBf7bNjHCVtU3zOJYN3bDS5bbh/dMYrxSopnEDkhbFC8ICidWtjMfWYzwUWyum +2YPDQeZaJqEwDElP4v9ZQt3XsP5AyqjmRGAvZwOdHePlg/ClxfUqhrLndPeZ478MbV1 UR5w== 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:autocrypt:from:references:cc:to:subject; bh=GYJ8IyIvPeWzKOmipz8J4yoc67UPeW0SZgSbk/TZets=; b=MRYlj7kz4fxn6K7J8sm6KL/vBdaQu/LPONMpFav3DPdbZPOmlsaTQCXiT5l4VfvO6L ZR8DzxIGom/qv3LmWO/j1SACeQg6+LbXyU0upN8IXEVYbVuQoQXj0woAH8h1pOLv9JCs UTAgqq+iWNCqrPY4+rvVeASpr6rto7OGFh5NmAbAm5mCb2w80nPwuZHROC151D4teoOJ QiUYMhe+cdQ1q6QlmXICAkLmHK69k9xIeYodTfmJDCxjmbdEiytpDpG5BihOEQC28Fay pkjTgAwaq51EDCNKrx9ufR6YCQgNWUrsqw9b0KJbWBNr4yiPsByQ7iw1+HeVBCljT9Jj zX9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si1550277edi.341.2020.09.03.01.19.06; Thu, 03 Sep 2020 01:19:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728352AbgICIQj (ORCPT + 99 others); Thu, 3 Sep 2020 04:16:39 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:38446 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728912AbgICIQb (ORCPT ); Thu, 3 Sep 2020 04:16:31 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 208B92054D; Thu, 3 Sep 2020 10:16:29 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NBo2575Zq-mU; Thu, 3 Sep 2020 10:16:28 +0200 (CEST) Received: from cas-essen-02.secunet.de (202.40.53.10.in-addr.arpa [10.53.40.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 6015520491; Thu, 3 Sep 2020 10:16:28 +0200 (CEST) Received: from mbx-essen-01.secunet.de (10.53.40.197) by cas-essen-02.secunet.de (10.53.40.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 3 Sep 2020 10:16:28 +0200 Received: from [172.18.16.185] (172.18.16.185) by mbx-essen-01.secunet.de (10.53.40.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2044.4; Thu, 3 Sep 2020 10:16:27 +0200 Subject: Re: [PATCH 1/1] iommu/vt-d: Fix NULL pointer dereference in dev_iommu_priv_set() To: Lu Baolu , Joerg Roedel CC: Robin Murphy , Wendy Wang , Ashok Raj , , References: <20200903065132.16879-1-baolu.lu@linux.intel.com> From: Torsten Hilbrich Autocrypt: addr=torsten.hilbrich@secunet.com; prefer-encrypt=mutual; keydata= mQENBFs5uIIBCAD4qbEieyT7sBmcro1VrCE1sSnV29a9ub8c0Xj0yw0Cz2N7LalBn4a+YeJN OMfL1MQvEiTxZNIzb1I0bRYcfhkhjN4+vAoPJ3q1OpSY+WUgphUbzseUk/Bq3gwvfa6/U+Hm o2lvEfN2dewBGptQ+DrWz+SPM1TQiwShKjowY/avaVgrABBGen3LgB0XZXEH8Q720kjP7htK tCGRt1T+qNIj3tZDZfPkqEVb8lTRcyn1hI3/FbDTysletRrCmkHSVbnxNzO6lw2G1H61wQhw YVbIVNohY61ieSJFhNLL6/UTGHtUE2IAicnsUAUKR8GiI1+3cTf233O5HaWYeOjBmTCLABEB AAG0L1RvcnN0ZW4gSGlsYnJpY2ggPHRvcnN0ZW4uaGlsYnJpY2hAc2VjdW5ldC5jb20+iQE3 BBMBCAAhBQJbObiCAhsDBQsJCAcCBhUICQoLAgQWAgMBAh4BAheAAAoJEJ7rXZh78/h8+tIH +QFYRQH4qh3WagcmjbG/zCe2RmZZePO8bmut2fAxY04aqJZGYUBxb5lfaWaHkstqM5sFD8Jo k1j5E7f1cnfwB21azdUO8fzYL889kdVO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la/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200903065132.16879-1-baolu.lu@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: cas-essen-02.secunet.de (10.53.40.202) To mbx-essen-01.secunet.de (10.53.40.197) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.09.20 08:51, Lu Baolu wrote: > The dev_iommu_priv_set() must be called after probe_device(). This fixes > a NULL pointer deference bug when booting a system with kernel cmdline > "intel_iommu=on,igfx_off", where the dev_iommu_priv_set() is abused. [...] > > Fixes: 01b9d4e21148c ("iommu/vt-d: Use dev_iommu_priv_get/set()") > Reported-by: Torsten Hilbrich > Reported-by: Wendy Wang > Link: https://lore.kernel.org/linux-iommu/96717683-70be-7388-3d2f-61131070a96a@secunet.com/ > Signed-off-by: Lu Baolu Tested-by: Torsten Hilbrich Regards, Torsten