Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp775631pxv; Thu, 15 Jul 2021 16:01:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHD0jGvetVmvNVcRzBK0txiHHJzDfu2RJlcr9n3k2a2vUv0LUgnY94cVxjyG06y6VB/kQu X-Received: by 2002:a02:c491:: with SMTP id t17mr1474308jam.56.1626390082546; Thu, 15 Jul 2021 16:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626390082; cv=none; d=google.com; s=arc-20160816; b=cMl0UviTyte7JqQyabAIz3ToO9/buug7uY/WKr/Q3NpCLwtfEEm6EVovLFNolynfx/ q02YW5XXTGHu98KkHbM+UvqB0+A1lAJWstrI6kf4KqK5YDGjHFnNo84aqNdJDW0gyAGf k1nvLr/zfNoMbbJFcqWFU13w2eXpEKJjlwGGLOK4zxVZpRU42oMjWl2cDaf0YnZuBfMu wqVJ16C4fT3Ihuv5d3QQmbtdvB0+VtkpwnU8Ur30nghD0gDFUWF0nXggbuH3WMSx8PqO bPP386igmUm6O4jGiFVpW1c8S16oXKn5F/EZlf/6YXyb0Ry/6UyJ5Ec5MBC3xemeYjau dAlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=cv762DhKWwFNW4o4fPAxXgVb+ogiBMu6pvrAB00g3ic=; b=uiQsAxRPShqSlJ50LoDwr1BgYWjzKYyv7otenB80kOwLcJsILP9KxYmVgSA3uJ2PJ3 cVwv5VO94/UluqlNDCp/K59l5+AFGIAE8dGx1tl/vuoox+uecDaIjnSaJLSEOvi7C0bw N/9rVi5hsEOJDQSZrznRb+DMnoyrwqMccugiaXtq9VtIi9hb/96D0xO3wuw4TDox0nGx 1WYRrjDOuSTYp7w1uN/v/a9/hkbqd4GfJjHMp0iDQLk0gGPDgH41OCUwDGVGCQYmakyv J3f69GSvK2XjkK2/uyyJlWaHNYlRwRnjYtAI4MeLu2gLBM555mmaGD2JgCCMQcfvAafU gRTQ== 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 o11si7974908ilg.108.2021.07.15.16.01.07; Thu, 15 Jul 2021 16:01:22 -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 S230048AbhGOXD2 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Jul 2021 19:03:28 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:28793 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbhGOXDZ (ORCPT ); Thu, 15 Jul 2021 19:03:25 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 5E49B240003; Thu, 15 Jul 2021 23:00:29 +0000 (UTC) Date: Fri, 16 Jul 2021 01:00:28 +0200 From: Miquel Raynal To: Desmond Cheong Zhi Xi Cc: Christoph Hellwig , Hillf Danton , syzbot , axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] possible deadlock in loop_add Message-ID: <20210716010028.4218b0de@xps13> In-Reply-To: References: <000000000000ec01e405c6c2cee3@google.com> <20210710131638.605-1-hdanton@sina.com> <20210712052740.GA8599@lst.de> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Desmond Cheong Zhi Xi wrote on Mon, 12 Jul 2021 16:29:16 +0800: > On 12/7/21 1:27 pm, Christoph Hellwig wrote: > > On Sat, Jul 10, 2021 at 09:16:38PM +0800, Hillf Danton wrote: > >> To break the lock chain, un/register blkdev without mtd_table_mutex held. > > > > Yes, Desmond Cheong Zhi Xi sent pretty much the same patch on June 18th > > (mtd: break circular locks in register_mtd_blktrans), but it did not get > > picked up. > > > > I believe Miquèl was waiting for -rc1 to apply it. Indeed, I already applied it but did not advertise yet. > > But taking a closer look, although the fix for the register path is the same, Hillf Danton's proposed patch additionally avoids inverting the lock hierarchy on the unregister path. So I believe this new patch should be more robust. We can definitely do this in two steps if you want. Thanks, Miquèl