Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2802189pxv; Mon, 12 Jul 2021 02:10:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaJS6TrplJU4nFHdFjPV3UJGhaSsMgxYE/ygml4WM/vGjF0p4W681UHLkWFh/0uFSfW60F X-Received: by 2002:aa7:c808:: with SMTP id a8mr43348370edt.245.1626081037671; Mon, 12 Jul 2021 02:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626081037; cv=none; d=google.com; s=arc-20160816; b=OfjbU2wiwfc5GZpkPUYkjZluovt15cZWwF2MjRYrmm9IzprLe1gmKq8vEhEypwqC6K Zh2qhh1TBefsyvBxRSWffFy3SjRjEQmtf3/fs6h7EHQeDf884o7G6Oa6C5Wt5WPeuXK5 MYaBXHp8FWyxsT+J+o4oMN3dJD+wfP4x78fFtp3zMmL281q2lhETIysP77VzjzLiEqTI CPRSnQxCpdHQSeOL5C94eHR1JTDDJsRSJog2pYDo31DdZ4zF8dZlDp9jbn9JnnEGz2bW WT/LvV6/mSHjlEg9UjNz2kRNjSqE3DgXqW+EvbrTcQSCqEUsbDTpjQv6HFO/7pdtu2Vj kwaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=53AxaG4tWABZBbJg99NxUsd0zCLnow37/ltA2An2gfE=; b=ywuIl1HZM/nvzo90bIiSD304hPQ+iUKQqRHt3P2Lc3jp4UsVkr/fFp9qHKQRL65pqK UDyIj3R5wV2NArMWSO5VLDqW9DOm3zcwFDWpmDqmOP2ulC3X9jlzBK1wTf4XgECuzscP o+ROfZmwT3AaFw+1vyGtAZsUxMD/MncgAyb7e5s/xZYDBW1L+apet/QhFrQDfJZUbTGH aM7QCM/3GsTL083u7yvwZ74uEQP6FcwTp1rI19WivPTjHPS4aHWN+wah6e/e9xcibtbZ 2kT3NpKXj9CtfqF8g1tAse9Qrg14j8/bpvoxqxU1tWQxysbk36yxF8oD3TB9ilrPHBSD F4Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=X6NoiOpn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si16316563ejd.416.2021.07.12.02.10.12; Mon, 12 Jul 2021 02:10:37 -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=pass header.i=@gmail.com header.s=20161025 header.b=X6NoiOpn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351339AbhGLJHz (ORCPT + 99 others); Mon, 12 Jul 2021 05:07:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354126AbhGLIcP (ORCPT ); Mon, 12 Jul 2021 04:32:15 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E36C7C061787; Mon, 12 Jul 2021 01:29:20 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id o3-20020a17090a6783b0290173ce472b8aso1182689pjj.2; Mon, 12 Jul 2021 01:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=53AxaG4tWABZBbJg99NxUsd0zCLnow37/ltA2An2gfE=; b=X6NoiOpnCB6DO60lVY3/HVL1mTycidMikYuz5wMEvAI3Fm6vPrRcg0dUMqpS7YZzd2 wMT/f7BJo0b5P/ujHsufa9xjaCI5qVGB/Bk+dI3rsktV25dGZdykCKGmjC78cI/L+aMO TtyfFoCdd3X1ezKyyhpCfNGdWCohe12hpmLVT4DVWtAEjsOPJEyiDkE7xGU5yocVFcyC zsQVXZVdqPT1MUvk1EYtEtTG81A3mc7sC5Fchpa/lW2kEI49XMsCtwpKjBr98SR/egNZ zyqyZ+WLjeL0Tvn8dXmrYO8InVkmSDF6wwuTj1djMf4qvOCISiL9JmCgzPrbcUiwf2Yr 72cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=53AxaG4tWABZBbJg99NxUsd0zCLnow37/ltA2An2gfE=; b=RdM26UjmB0QxqkIV0I+EE2OGFSDdODf0BeI2VgVvfJsFqiuVCIXHn2NNMMJzE7Ll91 psW3WIPvYgeX/+iHATS/9iFhFnicltAtGC4gAqTj7eg+PPU6yUt+ej0pax6zOkU29v+K 6CP+sBu2DpgLvMaoQRXBvDQCYzdH72dBO8cv3HJ/1EyqnFvLjvsB//XYmyOC5osXXQ0p O+A75eEhlWG2G1qp7zfn3QWCZsYarqgTc1h6g8Q9Zz1/zWCUKT/0YPhUcuLZaHB/tl/U b/V7ZQD+bbRu4odrY39NGVcijNWcN4epIlLVzjw0ZJxVtqb6soHNPnlyLnySMaceyH0Z GvSg== X-Gm-Message-State: AOAM530eeXMQ5QIEjc+mWOVNf7zAu4UrswqdXPA5p27EesdSZ+vsGLEv PGhliVY8SKJYtB97lvXwdg0= X-Received: by 2002:a17:90a:4cc4:: with SMTP id k62mr2427581pjh.110.1626078560408; Mon, 12 Jul 2021 01:29:20 -0700 (PDT) Received: from [192.168.1.237] ([118.200.190.93]) by smtp.gmail.com with ESMTPSA id k5sm14671775pfu.202.2021.07.12.01.29.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jul 2021 01:29:20 -0700 (PDT) Subject: Re: [syzbot] possible deadlock in loop_add To: Christoph Hellwig , Hillf Danton Cc: syzbot , axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Miquel Raynal References: <000000000000ec01e405c6c2cee3@google.com> <20210710131638.605-1-hdanton@sina.com> <20210712052740.GA8599@lst.de> From: Desmond Cheong Zhi Xi Message-ID: Date: Mon, 12 Jul 2021 16:29:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210712052740.GA8599@lst.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Best wishes, Desmond