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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 B8DDAC10F13 for ; Thu, 11 Apr 2019 12:13:35 +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 82AC32133D for ; Thu, 11 Apr 2019 12:13:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aPyQ8oWn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82AC32133D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+xGDCaaKjkFX39PxFf+Yfs40lY4nCZKzucZ/wObWytI=; b=aPyQ8oWnyVlsJSClGBP/Eq00t QHvqbmpaIlqgg7NxNLNu2G2732av+2Z4Uyx+RdjLHFIKk2IQgAHulRnTnF6HW6gvK0y07rVoiXLNw s08k+FhwUpXSum4d4LIOnfDGw7Xo6AkowCiUWTZ14tkIRNIykzC00YJNwKICtMpkSwN2ccySJdkQb SJutu+q/ukhuX/VTRnLTSk3a28lkRuv99W3PdkVugMvgKWcK17VsBJVh2RRtcQWEKCEr7yAIU8ZZK R5CL2ec9AxoIiShXBwiQRCH+rqiFksFM0VR5zm3gEujc6iRpieGyw0WdN19Eiisa25ZN5sxvQ41wS 4d87Zb9QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEYa7-0005jQ-W9; Thu, 11 Apr 2019 12:13:27 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEYa5-0005h6-IQ for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 12:13:27 +0000 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8C56641F068B8E92FEB3; Thu, 11 Apr 2019 20:13:18 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Thu, 11 Apr 2019 20:13:10 +0800 Subject: Re: [PATCH] driver core: Postpone DMA tear-down until after devres release for probe failure To: Robin Murphy , Greg KH References: <1553767685-27077-1-git-send-email-john.garry@huawei.com> <703aca1f-9475-b50d-624a-5f1ceea2c3b2@huawei.com> <20190403081433.GA13222@kroah.com> <3e1f3e2e-a1d3-ecaf-0931-44b4c10faffe@huawei.com> <198058c6-63c6-ac3c-62b7-438e5e3b3f0e@arm.com> From: John Garry Message-ID: Date: Thu, 11 Apr 2019 13:13:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <198058c6-63c6-ac3c-62b7-438e5e3b3f0e@arm.com> X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190411_051325_798412_59E81E58 X-CRM114-Status: GOOD ( 14.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh@kernel.org, chenxiang66@hisilicon.com, rafael@kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, iommu@lists.linux-foundation.org, geert@linux-m68k.org, hch@lst.de, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/04/2019 12:01, Robin Murphy wrote: >>>>>>> >>>>>>> The crash occurs for the same reason. >>>>>>> >>>>>>> In this case, on the really_probe() failure path, we are still >>>>>>> clearing >>>>>>> the DMA ops prior to releasing the device's managed memories. >>>>>>> >>>>>>> This patch fixes this issue by reordering the DMA ops teardown >>>>>>> and the >>>>>>> call to devres_release_all() on the failure path. >>>>>>> >>>>>>> Reported-by: Xiang Chen >>>>>>> Tested-by: Xiang Chen >>>>>>> Signed-off-by: John Garry >>>>> >>>>> So does this "fix" 376991db4b64? If so, should this be added to the >>>>> patch and also backported to the stable trees? >>>> >>>> Hi Greg, >>>> >>>> No, I don't think so. I'd say it supplements it. Here I'm trying to fix >>>> up another path in which we tear down the DMA ops prior to releasing >>>> the >>>> device's resources. >>>> >>>> I didn't add a fixes tag as 376991db4b64 didn't have one either. It >>>> will >>>> need to be backported to stable, I figure the same as 376991db4b64. >>> >> >> Hi Greg, >> >> I still think that we should consider merging this patch. > > Bah, sorry, I thought I'd replied to this thread already, but apparently > not :( > > I don't have a particularly strong opinion, but at the moment I am > leaning slightly towards this being a parallel fix for another part of > 09515ef5ddad, rather than a specific fix of the other fix. Either way, > you can have a: I'd say a parallel fix of 09515ef5ddad. > > Reviewed-by: Robin Murphy > cheers Robin > Thanks, > Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel