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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB565C27C40 for ; Thu, 24 Aug 2023 14:14:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238710AbjHXONg (ORCPT ); Thu, 24 Aug 2023 10:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241430AbjHXONd (ORCPT ); Thu, 24 Aug 2023 10:13:33 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3D83810C3 for ; Thu, 24 Aug 2023 07:13:31 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4051A1007; Thu, 24 Aug 2023 07:14:11 -0700 (PDT) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 00CEC3F762; Thu, 24 Aug 2023 07:13:29 -0700 (PDT) Message-ID: Date: Thu, 24 Aug 2023 15:13:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCHv2] dma-debug: don't call __dma_entry_alloc_check_leak() under free_entries_lock Content-Language: en-GB To: Sergey Senozhatsky , Christoph Hellwig , Marek Szyprowski Cc: Rob Clark , Petr Mladek , John Ogness , linux-kernel@vger.kernel.org References: <20230816023235.3798264-1-senozhatsky@chromium.org> <20230824031542.GB610023@google.com> From: Robin Murphy In-Reply-To: <20230824031542.GB610023@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/08/2023 4:15 am, Sergey Senozhatsky wrote: > On (23/08/16 11:32), Sergey Senozhatsky wrote: >> __dma_entry_alloc_check_leak() calls into printk -> serial console >> output (qcom geni) and grabs port->lock under free_entries_lock >> spin lock, which is a reverse locking dependency chain as qcom_geni >> IRQ handler can call into dma-debug code and grab free_entries_lock >> under port->lock. >> >> Move __dma_entry_alloc_check_leak() call out of free_entries_lock >> scope so that we don't acquire serial console's port->lock under it. > > Hello folks, > > Have you got a chance to take a look at the patch? [ For some reason Microsoft seem convinced all your emails are spam, so I have to keep digging them out of quarantine :( ] The patch itself looks reasonable enough to me, thanks for respinning. Acked-by: Robin Murphy