Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5116366pxv; Wed, 28 Jul 2021 03:36:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu26W4ory0gsY8gX2Q+rLgCYjWNs7LlVrmebQHt3S8cRGmHLoy9QMeISLtwbCTkXGauP0/ X-Received: by 2002:a05:6638:264e:: with SMTP id n14mr25700478jat.71.1627468575799; Wed, 28 Jul 2021 03:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627468575; cv=none; d=google.com; s=arc-20160816; b=Y8nVaonSVdhl4h+LqJiVMytci70xSRr3T/vHTlklkrgPeJ0UiKEg0paKD2qi6S/eKC 9PHHXqb2t2HIhDePuwovZ8zDmfYJa5OAwyIuTIZ3Rm5ct09J/E8yE9nzCbqQiqVRwZj1 Y1T6oTHWCYAK1+fEFKn21kbYZJNwLj4d4tbHDTSrNArDZ+TaJvGw12cSO7kWBcv9MBe5 dVvgaf3wj6zKv1Eh7hdohEhwb8/LVsRcCNAR+NJ/kRkOF6VCeS/b6bsluj4AM/ckGqAI 1eXA4REorbJJ+phNtgWKntcgSUucWRzzApfIIq6U2t4pNt7VLphGOZWnE3LT1mMYPIor g4qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:dkim-signature; bh=NxU06HLhrl9+rLyaZWdBMl0a7U1akRA+tjgjOr6pMYU=; b=OspwLZbmznksS06zLg7WJZYbLeLEfYAGt7rR34GmVKDArBxkUD0rNq9BclKEfre/X4 wPSVRYr6K6BiIEAiXFxXEUJjj7FkHXU7BhtvuxRRmfEjKvV2tC7O5wkL7AjUFbBQcvQI J/UHNlO2aORFdSC3jaK9KI/RyvWDtyl8G6Lu7sjTEQZ9h4z7VzVtMkT6tZNaAr93851l yFUkeCnuITygZEn68UU2kaYXfkcitA7AxxNrewSKpl4VhY4Zg87s3iNBQEUP4Ob9Lc4/ 7+9Hz9zfFuJkrA0HmDp/ybNfSpFY6qxk5hOMesbYh/CY2sIt3h1gTMLypBNlZ4Ohd0di GRRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailerdienst.de header.s=20200217 header.b=LIT9It63; 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 w5si7242147ilu.14.2021.07.28.03.36.04; Wed, 28 Jul 2021 03:36:15 -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; dkim=fail header.i=@mailerdienst.de header.s=20200217 header.b=LIT9It63; 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 S235417AbhG1KfY (ORCPT + 99 others); Wed, 28 Jul 2021 06:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234354AbhG1KfQ (ORCPT ); Wed, 28 Jul 2021 06:35:16 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB24C061757 for ; Wed, 28 Jul 2021 03:35:15 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout1.routing.net (Postfix) with ESMTP id 506D13FC25; Wed, 28 Jul 2021 10:35:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1627468513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NxU06HLhrl9+rLyaZWdBMl0a7U1akRA+tjgjOr6pMYU=; b=LIT9It63QvpF3ZFNFDrvNEFGugyOiUgFtR6AvRUGkvR3zsWvUmhuvWsn0kr6EaaKe5iD8m zRmGZD17fkL/vKmYQKW+5LPpi5yY4bc0ni3NuK0HPfYULxPZlVzmvwOmG44gwyBhFswbW9 n5FKE5/VryVSVQSKxjhUpFhfk5T7Eu8= Received: from frank-s9 (fttx-pool-217.61.145.245.bambit.de [217.61.145.245]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 98E7C1007DD; Wed, 28 Jul 2021 10:35:12 +0000 (UTC) Date: Wed, 28 Jul 2021 12:35:07 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: <20210715071150.82157-1-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] iommu: check if group is NULL before remove device To: Joerg Roedel CC: iommu@lists.linux-foundation.org, Frank Wunderlich , Will Deacon , linux-kernel@vger.kernel.org, yong.wu@mediatek.com From: Frank Wunderlich Message-ID: X-Mail-ID: c5da2f25-14af-4163-bd01-1aee1eb1c340 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joerg, Sorry for late reply, somehow i marked message as read without answering i= t=2E Am 15=2E Juli 2021 09:20:04 MESZ schrieb Joerg Roedel : >On Thu, Jul 15, 2021 at 09:11:50AM +0200, Frank Wunderlich wrote: >> From: Frank Wunderlich >>=20 >> if probe is failing, iommu_group may be not initialized, > >Sentences start with capital letters=2E > >IOMMU patch subjects too, after the 'iommu:' prefix=2E Will fix these in v2 >> so freeing it will result in NULL pointer access > >Please describe in more detail how this NULL-ptr dereference is >triggered=2E I had this by testing this series:=20 https://patchwork=2Ekernel=2Eorg/project/linux-mediatek/list/?series=3D515= 129 Initialization in mtk driver was failed (i guess the iommu group was not y= et created), cleanup was started and so this function is called with a NULL= group pointer=2E I can try to find my debug-trace if you need a kind of ba= cktrace=2E regards Frank