Message ID | 20230623213406.5596-1-risbhat@amazon.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6056162vqr; Fri, 23 Jun 2023 14:44:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4sneUlSS3Ime1x8k5/3yM3jVwOGZBAdwn63r+iapFhsEulk3lm1ZRJp++KIj91belTjvmE X-Received: by 2002:a05:6a00:1746:b0:668:9dca:13ac with SMTP id j6-20020a056a00174600b006689dca13acmr11652506pfc.7.1687556665858; Fri, 23 Jun 2023 14:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687556665; cv=none; d=google.com; s=arc-20160816; b=uhErxEcwG24nVckk1K+gQkDjATZovyWxFFVl8pb3xNDIBqh6KLrb1/4hHHwnXbITnX gkavDPJI3HcoDjNtl7lBxZm5adSg4mm8Q0GU1fGmLm1Z8Fe1mZCLtrU4zexjPC5COjOD qPBMP0o4bsntfbiSocAG05L5poXteSxGIYYj9EV6Ezz0uWSFtMNfL/KzMnBtNFJzlTl+ HBGJbwlF5wW8hB8g+U17KBp6IATjqvrrPZ7Da7JuRStweoI2/vo1Ooy0gC5hNUKuZ2nN 5moEOlqLNzUjHLwqxi+Z3kSZ6kyEL6PJRgQfD+9euwRy1uuQM3bPE/JKNLBO5cx8XP2u kIZQ== 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=2TUgoT4bLvHLzmABFNFloySgnKYSBz0bB+q6744uJI4=; fh=ekYotY3SziGFrT+MD/dmA8V8XbfY8dI7oZPqxnbR6uQ=; b=ASfXPx1pmYEtL1b4b0wrf31OSNelyvcOn5MgBsUoCmg1ASXI9iEuI84mlQISnSrRNQ QEHap5a7tjfp68uDRVkfznVdIGYuR+Obuz5j7CF5Iaboa9tZGZFYPDogswrIBA9k9dSm SIO+Mc7zHm8YD9WGgpBV8Pam/xYNUTeB/0TssrO+En9JeIJQKjxzncwSTS644oTFmE6u mPxo5XvyUa5jRHBqJR6SJD0HeiQYGbGpjdnmwBvAl74gz/p9/zQtSw25CzIuS2vU+jiA zS2KuyUUCCafKR2ElJF/qIqKWLxzvofwDmgS4+MeZQHwtyoNEPgY0KgOIwyq/a/WQpnJ +eRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=W6bX+dkF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u185-20020a6385c2000000b0054fe2dfaabcsi271869pgd.526.2023.06.23.14.44.12; Fri, 23 Jun 2023 14:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=W6bX+dkF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232350AbjFWVfl (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 23 Jun 2023 17:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbjFWVfi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 23 Jun 2023 17:35:38 -0400 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61B51BD8; Fri, 23 Jun 2023 14:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1687556138; x=1719092138; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2TUgoT4bLvHLzmABFNFloySgnKYSBz0bB+q6744uJI4=; b=W6bX+dkFhb4x/ZnzNi+WpJuq8G8bKGfu7xN1CwRkWf3AyQcl9BICpGDb r1a0a/MpSed3II+NMh5HHdXvoJrZ+FOJJF//jQ6G3FJq3Un+K/4vXj27I LM9pSJKFmWofB5LVwfHZGNHQcY26PJjb1vPytO6U7pZFbd8HxKPdyTvyv 4=; X-IronPort-AV: E=Sophos;i="6.01,153,1684800000"; d="scan'208";a="222572587" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-m6i4x-83883bdb.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2023 21:35:37 +0000 Received: from EX19MTAUWC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-pdx-2a-m6i4x-83883bdb.us-west-2.amazon.com (Postfix) with ESMTPS id 28E5960A79; Fri, 23 Jun 2023 21:35:35 +0000 (UTC) Received: from EX19D002UWA001.ant.amazon.com (10.13.138.247) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 23 Jun 2023 21:35:35 +0000 Received: from EX19MTAUEA001.ant.amazon.com (10.252.134.203) by EX19D002UWA001.ant.amazon.com (10.13.138.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 23 Jun 2023 21:35:35 +0000 Received: from dev-dsk-risbhat-2b-8bdc64cd.us-west-2.amazon.com (10.189.73.169) by mail-relay.amazon.com (10.252.134.102) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 23 Jun 2023 21:35:34 +0000 Received: by dev-dsk-risbhat-2b-8bdc64cd.us-west-2.amazon.com (Postfix, from userid 22673075) id B1DBD25EC; Fri, 23 Jun 2023 21:35:34 +0000 (UTC) From: Rishabh Bhatnagar <risbhat@amazon.com> To: <gregkh@linuxfoundation.org>, <pc@cjr.nz> CC: <stable@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-cifs@vger.kernel.org>, Rishabh Bhatnagar <risbhat@amazon.com> Subject: [PATCH 5.4 0/5] CIFS DFS fixes for 5.4 Date: Fri, 23 Jun 2023 21:34:01 +0000 Message-ID: <20230623213406.5596-1-risbhat@amazon.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769531418063418961?= X-GMAIL-MSGID: =?utf-8?q?1769531418063418961?= |
Series |
CIFS DFS fixes for 5.4
|
|
Message
Rishabh Bhatnagar
June 23, 2023, 9:34 p.m. UTC
We are seeing deadlock in cifs code while updating volume in cifs_reconnect. There are few fixes available in stable trees already. This series backports some patches back to 5.4 stable. __schedule+0x268/0x6e0 schedule+0x2f/0xa0 schedule_preempt_disabled+0xa/0x10 __mutex_lock.isra.7+0x20b/0x470 ? dfs_cache_update_vol+0x45/0x2a0 [cifs] dfs_cache_update_vol+0x45/0x2a0 [cifs] cifs_reconnect+0x6f2/0xef0 [cifs] cifs_handle_standard+0x18d/0x1b0 [cifs] cifs_demultiplex_thread+0xa5c/0xc90 [cifs] ? cifs_handle_standard+0x1b0/0x1b0 [cifs] Paulo Alcantara (SUSE) (5): cifs: Clean up DFS referral cache cifs: Get rid of kstrdup_const()'d paths cifs: Introduce helpers for finding TCP connection cifs: Merge is_path_valid() into get_normalized_path() cifs: Fix potential deadlock when updating vol in cifs_reconnect() fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++--------------------- 1 file changed, 372 insertions(+), 329 deletions(-)
Comments
Rishabh Bhatnagar <risbhat@amazon.com> writes: > We are seeing deadlock in cifs code while updating volume in > cifs_reconnect. There are few fixes available in stable trees > already. This series backports some patches back to 5.4 stable. > > __schedule+0x268/0x6e0 > schedule+0x2f/0xa0 > schedule_preempt_disabled+0xa/0x10 > __mutex_lock.isra.7+0x20b/0x470 > ? dfs_cache_update_vol+0x45/0x2a0 [cifs] > dfs_cache_update_vol+0x45/0x2a0 [cifs] > cifs_reconnect+0x6f2/0xef0 [cifs] > cifs_handle_standard+0x18d/0x1b0 [cifs] > cifs_demultiplex_thread+0xa5c/0xc90 [cifs] > ? cifs_handle_standard+0x1b0/0x1b0 [cifs] > > Paulo Alcantara (SUSE) (5): > cifs: Clean up DFS referral cache > cifs: Get rid of kstrdup_const()'d paths > cifs: Introduce helpers for finding TCP connection > cifs: Merge is_path_valid() into get_normalized_path() > cifs: Fix potential deadlock when updating vol in cifs_reconnect() > > fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++--------------------- > 1 file changed, 372 insertions(+), 329 deletions(-) Looks good, thanks.
On Fri, Jun 23, 2023 at 07:08:22PM -0300, Paulo Alcantara wrote: > Rishabh Bhatnagar <risbhat@amazon.com> writes: > > > We are seeing deadlock in cifs code while updating volume in > > cifs_reconnect. There are few fixes available in stable trees > > already. This series backports some patches back to 5.4 stable. > > > > __schedule+0x268/0x6e0 > > schedule+0x2f/0xa0 > > schedule_preempt_disabled+0xa/0x10 > > __mutex_lock.isra.7+0x20b/0x470 > > ? dfs_cache_update_vol+0x45/0x2a0 [cifs] > > dfs_cache_update_vol+0x45/0x2a0 [cifs] > > cifs_reconnect+0x6f2/0xef0 [cifs] > > cifs_handle_standard+0x18d/0x1b0 [cifs] > > cifs_demultiplex_thread+0xa5c/0xc90 [cifs] > > ? cifs_handle_standard+0x1b0/0x1b0 [cifs] > > > > Paulo Alcantara (SUSE) (5): > > cifs: Clean up DFS referral cache > > cifs: Get rid of kstrdup_const()'d paths > > cifs: Introduce helpers for finding TCP connection > > cifs: Merge is_path_valid() into get_normalized_path() > > cifs: Fix potential deadlock when updating vol in cifs_reconnect() > > > > fs/cifs/dfs_cache.c | 701 +++++++++++++++++++++++--------------------- > > 1 file changed, 372 insertions(+), 329 deletions(-) > > Looks good, thanks. All now queued up, thanks. greg k-h