From patchwork Fri Oct 28 00:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Brennan X-Patchwork-Id: 13022934 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 CAD0EFA3743 for ; Fri, 28 Oct 2022 00:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234804AbiJ1AKb (ORCPT ); Thu, 27 Oct 2022 20:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbiJ1AK2 (ORCPT ); Thu, 27 Oct 2022 20:10:28 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C0837FB6; Thu, 27 Oct 2022 17:10:26 -0700 (PDT) Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29RMO7DU005927; Fri, 28 Oct 2022 00:10:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=7vQvu9vc3UC1afkOp5IDlzyW0Jgv4xGFic4JwBlj5IM=; b=TLv2hlFHxMtN4p2oFK9oA7fCoxRHlEU6KE6CQVVsG//zenKkNbEpTOJOmZAEXfstdKpN jblL1ouSBKmPuTtegLiqSg6FesU/nLRPAL6KAls3TEHxXqYhnKizkOkzVn7bcNhmJ0uH 66/vY3s1cYa3sF18pjxqw86TPW8zUU9eptlVC1VODZ3AOxTByFc+CfHtEtwu0ck5BcG+ 34nDHnUOau095cRo5Ru+UL32Dgbin6waoybanEYMPdv+Q6R+8kt2JrIuGg00sA2qsYcq bolVduaMl2ko3cQQTQnu/dvu0W/yh/o1rAlYxgtrU6P4XRBYknDritMl3QaQUgwqueYI BA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kfax7uh76-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Oct 2022 00:10:23 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 29RLoWmb006786; Fri, 28 Oct 2022 00:10:22 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3kfaghgy1n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 28 Oct 2022 00:10:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VnDZVQn7oEuO147CNFWOXy/v5PDzZOPj8NWJBvIVxs6RvUAd/YkFT1Bdcs61v3juFa9aGUIWwKkiTPktaJPRiJXi/YtSPurVpxig5CkhyR4GYkUYNS7E4T4OtRHBRX4sZP0Q0fiLWI0pnmMIWQ0dkG9ZOKsU/n8UwPUmAG8zQ0VENxADaJViF6nRmWdFdjyhDrgEf0GRr84Ua1dIdhs+OPMGw3TvKkg2a91f5QnTObCIn8fyWxjM5cOoTgyNH5+pyUBe+l+HpOIuP1dnN7CJ3rtZMBecTlTmqZcDDch8M1jvyUyXh2aNTzxWV+Y2KSQVIqvSpcVDpto0m6LwOanZHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7vQvu9vc3UC1afkOp5IDlzyW0Jgv4xGFic4JwBlj5IM=; b=d+wPtmndaiLhjfbW0HszyvDe4KXz4706BKc63wfDq7drSXVlyBxRID0M4/e21bLpUHpZfVigHkx8KMRK7vUD9DLu9X1mWlDNrcBViKtt3Vo/J9pHl9+9bVXf4ywe5BgpdlPlxqnsiRn5OF4LuArqYjK6ji8bAGaE7M/4+mCIbcA8wvH3B0dT3s7Sf49y30lCoCeE3P4pQqgXW8AOo/np2Ce+vxCGVlDNnPQHiH1L+dUM0k/xmXVVzoGMYvuNROZ4AEGuA2ME4THxnJs17vzGrjuZL34txcXbu4wHZTFk6RxyAn2JR2hgnV9y1J/bkArgt9hEk7WW3hFIXyIGI/SDxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7vQvu9vc3UC1afkOp5IDlzyW0Jgv4xGFic4JwBlj5IM=; b=h1l7HBZD0/xX74nGbR+tSskjE8MtI+CyZEX93kBeWGsW90zK0XPFs2pE1OSBbLrWchNzTj2MOqQkTLyM/RBZpD8ONF+d307wTqjuT0yQOWH9V9wH2tNSwIBanZ3FyQkUzq8Bti9aT3LAC/rXvyoDkaVt2SQSoFdyi7COjD0o79s= Received: from CH2PR10MB4166.namprd10.prod.outlook.com (2603:10b6:610:78::20) by BY5PR10MB4130.namprd10.prod.outlook.com (2603:10b6:a03:201::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14; Fri, 28 Oct 2022 00:10:20 +0000 Received: from CH2PR10MB4166.namprd10.prod.outlook.com ([fe80::36b6:3767:c15f:3b24]) by CH2PR10MB4166.namprd10.prod.outlook.com ([fe80::36b6:3767:c15f:3b24%9]) with mapi id 15.20.5769.015; Fri, 28 Oct 2022 00:10:19 +0000 From: Stephen Brennan To: Jan Kara Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Amir Goldstein , Al Viro Subject: [PATCH v3 0/3] fsnotify: fix softlockups iterating over d_subdirs Date: Thu, 27 Oct 2022 17:10:13 -0700 Message-Id: <20221028001016.332663-1-stephen.s.brennan@oracle.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221021010310.29521-1-stephen.s.brennan@oracle.com> References: <20221021010310.29521-1-stephen.s.brennan@oracle.com> X-ClientProxiedBy: SN7PR04CA0037.namprd04.prod.outlook.com (2603:10b6:806:120::12) To CH2PR10MB4166.namprd10.prod.outlook.com (2603:10b6:610:78::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR10MB4166:EE_|BY5PR10MB4130:EE_ X-MS-Office365-Filtering-Correlation-Id: f74fd9c4-80b2-48bb-1892-08dab878cc74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kFrGPGCySIRnHmV/LlT0hsJ7QXUCNGbwYpcuQTjvAfRfEbUZB5OTDKfPOivBuy11DWYBGnHD8vUOlmBZWoWG4lJ/HqPnTJbV3eZ21s7UZF5YWqOOzUA5t/De5tP3RvBBipHGFaBYzbW4ZfQv6IcMcoTYo1CQIchlmf89CYEgkqcYqli/d7SZ0u8lcm8iBwCPZZxV46L+ASqTbcxeP2eltHHbMxuTqUp6Vie73lHOsuBO8zuJEMpGqNuf6awvhsYX7WBm7ylQJFyECN1yxvWgfegvh8sICGZLTy0eAvS8iUaaCrP2OUKwLm/MulbAOaZLF+CiV02k8naifZ3cTj1+GmdRdqMzWUFJ9CMqw8YrUm/HeaXRyaZCyOkhC4YCCy+mtvRJ+L4MRvN+nWrslfFpmBnLReGePnDFi0VKnQrG8LcNPkKGFXgeQlRbAjthYnH51s50ZV7YBnyiZpdVd/R/9ZVebIDKq71CqoE/YmANbVgJEdud7NoYAv2ZH9G7AjwdVFzMm7nqIDgXLHFhAh9B+lu0heB6SLNVmfDdN3lggBUc9M1FQan9eedFYi/QnG5EamIGnDWwWrx0IOVVpIv8VB/bnxfS96taKdJ/YS9HESJDw+b6usKgX6rz8LhI/GT9LYfn2ObMHNhN8sWGaqRqz9CWsnlvyoYRK+zDNvuyjJhf/vLoYm0o3bHu7La28bWKqIYPavQg7tiJW9yTpKeo6w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR10MB4166.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(376002)(346002)(39860400002)(396003)(136003)(451199015)(83380400001)(103116003)(36756003)(6486002)(6666004)(478600001)(5660300002)(66946007)(4326008)(8676002)(66476007)(8936002)(66556008)(41300700001)(54906003)(6916009)(316002)(4744005)(6506007)(1076003)(2616005)(38100700002)(186003)(6512007)(26005)(86362001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PlXbKXBORVZjDmC4XBkVFTo1wRVRZDG7QBOVykU1tFMKkwMx+m5GWq0ueQ5BeOWvqxa0QrPjibnoyfJufDG4Q3HWzOeJv5zVkawsiJbl67cZij3EstyV6bvweR7EpDLCnceD2/Orjvyu2qF9ETswcMSm22ZiKVhJvkZ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HsWKnWHSryfaQEbYrOLMOGmDW6Ci/k2PtqrDnU9JJHvA684WbkAPywYFPrNMq4QdBCOY8bmMURnwlEuiPcznXGmT2bWnSD3kd3m67lO5/sCDUlzXnM9EWH8r55coxUPrqzqSUDXOoXQaN/BT5UNkQKolzuxdda8KPafmJ1OzkiAPd2OH9mmCT9G83SAnlWD370KraL7Km3iiOBDEvA3NlbUVXQk5ow1+Q07bL6rcuV3jdlpinquAEmAVyhQQz7OHyenEt17+yHm2vXVh+R0gEqDezMuRmbEo7NMmdFzmARxB9JxN/rQO3hfoRFvI1ZrsNBOxuNZ2g6FFKUOsxv9tRL9UsYDQWJl3CZfGjy6bhshR8GH2vK6m/7plA1UM5qe3qfEgujJw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f74fd9c4-80b2-48bb-1892-08dab878cc74 X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4166.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 00:10:19.3982 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2pS+WYKyzDiC2H3gYHfDbSFOoxbyanXQC0mloQQa8EjuVbWB3qmkHni4TrifkXm4uJ2Vt5lWbwFaTdIv0QXLKLCNnLoNgYWEmpcXpLZpT5M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4130 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-27_07,2022-10-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 mlxscore=0 mlxlogscore=941 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2210270138 X-Proofpoint-GUID: AWmWzrcAWuai_5eUifGj5kR6_0sdu4-o X-Proofpoint-ORIG-GUID: AWmWzrcAWuai_5eUifGj5kR6_0sdu4-o Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi all, Here is v3 of the patch series. I've taken all of the feedback, thanks Amir, Christian, Hilf, et al. Differences are noted in each patch. I caught an obvious and silly dentry reference leak: d_find_any_alias() returns a reference, which I never called dput() on. With that change, I no longer see the rpc_pipefs issue, but I do think I need more testing and thinking through the third patch. Al, I'd love your feedback on that one especially. Thanks, Stephen Stephen Brennan (3): fsnotify: Use d_find_any_alias to get dentry associated with inode fsnotify: Protect i_fsnotify_mask and child flags with inode rwsem fsnotify: allow sleepable child flag update fs/notify/fsnotify.c | 115 +++++++++++++++++++++------- fs/notify/fsnotify.h | 13 +++- fs/notify/mark.c | 124 ++++++++++++++++++++----------- include/linux/fsnotify_backend.h | 1 + 4 files changed, 185 insertions(+), 68 deletions(-)