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=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 3382AC07E9C for ; Wed, 7 Jul 2021 17:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1039B61C4E for ; Wed, 7 Jul 2021 17:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230439AbhGGRIu (ORCPT ); Wed, 7 Jul 2021 13:08:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbhGGRIt (ORCPT ); Wed, 7 Jul 2021 13:08:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4A06A61C7F; Wed, 7 Jul 2021 17:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625677569; bh=Q3PwKU2MWriiez/7uEGY76FwByXF51elK2MPyqH+BDw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=aJxD8e5bZAU/ArkUH8mQlC6pi/cl6Ipfk4qd3l960Fvc9I+ZdcvoFvwuOCeyMZZO5 0P2YAlLy5+acaD1nXZWuFQpZaBhWkISZq5DILzu3pClnr1OzG78QZxvARoWltS23A6 PV5m/dgpvj5cndgNGYFPIJVcYgJjuvoKn2zj3m0wtVV+oxkxwCteNRDTOK6KH8GejO kgO/OweukSzwSFYYyA6AUrfR6Pub0zht27FcD5NVnxoUkUsXE/OS9zw5ne4eTAZBxm P7ZJOa6oz6WJHk4i63O+pM0jeQGz94g9CvbHUFpLqDcTENi6b1B/WnHMLSJ96r3KrV FvK5oT8v5eg2g== Message-ID: <15fbc55a3b983c4962e9ad2d96eeebd77aad3be6.camel@kernel.org> Subject: Re: [PATCH v3 0/2] fcntl: fix potential deadlocks From: Jeff Layton To: Desmond Cheong Zhi Xi , bfields@fieldses.org, viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, gregkh@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org Date: Wed, 07 Jul 2021 13:06:07 -0400 In-Reply-To: <20210707074401.447952-1-desmondcheongzx@gmail.com> References: <20210707074401.447952-1-desmondcheongzx@gmail.com> Content-Type: text/plain; charset="ISO-8859-15" User-Agent: Evolution 3.40.2 (3.40.2-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-07-07 at 15:43 +0800, Desmond Cheong Zhi Xi wrote: > Hi, > > Sorry for the delay between v1 and v2, there was an unrelated issue with Syzbot testing. > > Syzbot reports a possible irq lock inversion dependency: > https://syzkaller.appspot.com/bug?id=923cfc6c6348963f99886a0176ef11dcc429547b > > While investigating this error, I discovered that multiple similar lock inversion scenarios can occur. Hence, this series addresses potential deadlocks for two classes of locks, one in each patch: > > 1. Fix potential deadlocks for &fown_struct.lock > > 2. Fix potential deadlock for &fasync_struct.fa_lock > > v2 -> v3: > - Removed WARN_ON_ONCE, keeping elaboration for why read_lock_irq is safe to use in the commit message. As suggested by Greg KH. > > v1 -> v2: > - Added WARN_ON_ONCE(irqs_disabled()) before calls to read_lock_irq, and added elaboration in the commit message. As suggested by Jeff Layton. > > Best wishes, > Desmond > > Desmond Cheong Zhi Xi (2): > fcntl: fix potential deadlocks for &fown_struct.lock > fcntl: fix potential deadlock for &fasync_struct.fa_lock > > fs/fcntl.c | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > Looks like these patches are identical to the v1 set, so I'm just going to leave those in place since linux-next already has them. Let me know if I've missed something though. Thanks! -- Jeff Layton