From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF210C34047 for ; Wed, 19 Feb 2020 10:56:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DE9A2464E for ; Wed, 19 Feb 2020 10:56:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PtkbCim7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DE9A2464E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=468Qj8D9qsHWbs5B4Bf7WQD2AXwPwtAfcv1NaV+LJaM=; b=PtkbCim7ChDRji 8PyxRoDYRV0LQJW5o/xrSsMZw3UnIiLKEJjKp3bT1Ze+BRNiopzGTc3kissQeEOcSXObdbpPSW6Ap M4jI0o3WNP4ldkJUxAnMMDICdjjRS9mxU6FGHfxr2mYvjnya+pANwF5mL7irywFtpwgdANyONp0FO l1PrEStyuuAqOBRwx0/lWtbC0RFi4dLYyz5Z0QqupW6hL2PA42yR1A9QplTfmS+zh40H3GTLW2G5o ffghVz8J3b3eEWmP6R8Qhlr9xlgb9Ok1Z0kpUukp11Ggou3pBxOGKsyc+wenjQp2HFUaRvUZGNUVq 2pONoQHXGG9zP+JtfLOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4N21-0005G8-53; Wed, 19 Feb 2020 10:56:41 +0000 Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4N1x-0005Fe-IB for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 10:56:38 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 9D7A536A; Wed, 19 Feb 2020 11:56:35 +0100 (CET) Date: Wed, 19 Feb 2020 11:56:34 +0100 From: Joerg Roedel To: Robin Murphy Subject: Re: [PATCH] iommu/qcom: Fix bogus detach logic Message-ID: <20200219105634.GF1961@8bytes.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200219_025637_754661_DB3E2B6F X-CRM114-Status: GOOD ( 10.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stephan@gerhold.net, linux-arm-msm@vger.kernel.org, Naresh Kamboju , iommu@lists.linux-foundation.org, robdclark@gmail.com, linux-arm-kernel@lists.infradead.org, Brian Masney Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 18, 2020 at 06:12:41PM +0000, Robin Murphy wrote: > Currently, the implementation of qcom_iommu_domain_free() is guaranteed > to do one of two things: WARN() and leak everything, or dereference NULL > and crash. That alone is terrible, but in fact the whole idea of trying > to track the liveness of a domain via the qcom_domain->iommu pointer as > a sanity check is full of fundamentally flawed assumptions. Make things > robust and actually functional by not trying to be quite so clever. > > Reported-by: Brian Masney > Tested-by: Brian Masney > Reported-by: Naresh Kamboju > Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") > Signed-off-by: Robin Murphy > --- > drivers/iommu/qcom_iommu.c | 28 ++++++++++++---------------- > 1 file changed, 12 insertions(+), 16 deletions(-) Applied, thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel