Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1411808pxv; Fri, 2 Jul 2021 03:13:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr+6PaHwAoL77hlskR5nepfdmwDBXu04coy431tgDIspMG+4YcIE8cNhbzW9/8S+7wxgEf X-Received: by 2002:a17:906:15c2:: with SMTP id l2mr4563521ejd.348.1625220801505; Fri, 02 Jul 2021 03:13:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625220801; cv=none; d=google.com; s=arc-20160816; b=XHuHqXPtrd99xuZJxt2kRR8fyZBs0qTv/u1vHomiYtueXjlh+2M/SVj07MZ4RJtWYA P6YrdcsUiBoj/g91dNeQZpqVsdHJ/381fi+DokzfpZqd/mwEiftH91TUyRSmTwssq0kQ zTVjHBvWLSeNwvukb2bZUmW97fU3+fxfkgsyJYmrSMZKNbKfn29IY3iyD+3xTApLy27E 0EzQObormJ4SEl80D0AK8buxql+6csqvjrmL+vzYZWoS/5G0tsnQBufO/VvB4n8BaCHk xPXnyzuBEc2XPmHzd3OxIdFaB6ZKTTvcwXuOcmP6jxV6+C0okDGuwFI2TYh/MKHggE3G AP5g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uJEaMh5QMIWKQSiW3NhFAWboQVAmMWKJTMsm2BnrKWA=; b=rj1it+ujfLEhr4p8QXIOnBE41/2FNYnnjQqLiYdNqd77lHX8eLvPVbmsovSpopwxsB x5fS2Q1Gmf2NIc1DjnUG5BohLBz6o3kToPsFsgrPhDkksaHUz603r/PtTuYHGTSwxWFa MKYlJJEO/eKXW8Khfpt37p8PpqCceXy354V6p/zvM+6VWFBahM7hRJnBbVuMaykFdg/P oWrHywBXmqZmxsfqEfjKRaHOmcK78b/5po+RALD9b5hEVlQQVwexfvfSyfLfMFY8ohQd UVuyWOFllzseXCtnvzQS4IL7U+6NHd9GcFItum/ZOX30JDNm2SY/NFjPzjvYA01shKqO h30g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b3Agk3pa; 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 r21si3309966ejo.665.2021.07.02.03.12.56; Fri, 02 Jul 2021 03:13:21 -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=b3Agk3pa; 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 S231137AbhGBJV2 (ORCPT + 99 others); Fri, 2 Jul 2021 05:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbhGBJV0 (ORCPT ); Fri, 2 Jul 2021 05:21:26 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5B31C061762; Fri, 2 Jul 2021 02:18:53 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id v7so8981691pgl.2; Fri, 02 Jul 2021 02:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uJEaMh5QMIWKQSiW3NhFAWboQVAmMWKJTMsm2BnrKWA=; b=b3Agk3pau1jzghfawlkN8c7Mdga3Nzlj5mQz3xpbz85WeyXNj6Gs54d14giwqX75H5 2/iO0XgdoLFJBLkqOlQhhvM/a+j/UNWycRXpCosZ3mKhrSwvnnlt9cjIDIIEiAXXFj1A i3MRRi1eV9LT+3SxSydMIET2w22HX1dFDfxfLK73wbc8ITyzucHWxXKLGt2rBLrgUXr3 Hi5p4TEE1FwGiD8tth8dAB3fbitiFQ/0iez44c5sf/YhBszhhorsAE1aSpgp57Wwm6hD zR+SNI6cCUS+7F+0oiMJQEBhLDG07QhSEynK0a4gOpcwTDbfV1UpYirNtbrS5fUZ4t+o 30XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uJEaMh5QMIWKQSiW3NhFAWboQVAmMWKJTMsm2BnrKWA=; b=aok8BwvV4c5LMcJS4l5hYXjYzd2MEuUfDYF7h7EFPr9a/uJI/vR28RZUUOId7afwNL 7/bz0vhMz2hev6nBRWWmrAKkwy8p1bKpHjO08c4kfz87G5c5WnYQ7GWPfxZdz6Be1aEx oWGRPSsE1YEXjd5xxbU7TTJyBnVlxPIwYfUg5XVw88fRwUO2S+Acwbbgz0xkpm512AEP Hmv7bhQr+0/us4aU0cbEeOuYHm2LSA+AtrtgaCLqGJqbaPXja6vIGUQV/adswQ4quwse EHp75OQdtWvhZDtnWnxVgfoED7+W95Q4wYFEhxDZjnYsa2CtfzKAJUELPRID4MofMuC0 CZ3Q== X-Gm-Message-State: AOAM533Aa8TsZIw9WH1JECQHuV5FHXnaO7ESHboVPgH+uMHQlTLnZM/7 42EOERPaqlVzl8zBAZ+86fU= X-Received: by 2002:a63:4f11:: with SMTP id d17mr1260315pgb.20.1625217533419; Fri, 02 Jul 2021 02:18:53 -0700 (PDT) Received: from localhost.localdomain ([118.200.190.93]) by smtp.gmail.com with ESMTPSA id y3sm3023918pga.72.2021.07.02.02.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 02:18:53 -0700 (PDT) From: Desmond Cheong Zhi Xi To: jlayton@kernel.org, bfields@fieldses.org, viro@zeniv.linux.org.uk Cc: Desmond Cheong Zhi Xi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, gregkh@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH 0/2] fcntl: fix potential deadlocks Date: Fri, 2 Jul 2021 17:18:29 +0800 Message-Id: <20210702091831.615042-1-desmondcheongzx@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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 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(-) -- 2.25.1