From patchwork Wed May 24 02:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13253225 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 ADC6CC7EE23 for ; Wed, 24 May 2023 02:26:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236116AbjEXC0i (ORCPT ); Tue, 23 May 2023 22:26:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbjEXC0h (ORCPT ); Tue, 23 May 2023 22:26:37 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B04C41A8 for ; Tue, 23 May 2023 19:26:29 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2af189d323fso67547991fa.1 for ; Tue, 23 May 2023 19:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684895187; x=1687487187; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=RECNaUh/nKqVFPcbCgavk+v688GOwa63uXMue1K0zos=; b=VZ366sLwbjL45qAKg9Yf2Y5tGMc8nRZcOfZcX+p9lIMUg3lp6VixKGGfSjKQ3ulfVO uIYY4SALEQjXlKzraLAePIGnKJJ/TCf/nelHDzkiwKIwodqcCXW8NIm9bSlRfywBc6mt M3TdZmtaId0mdV3eDg/qsmIpYIA5Qixx2cidYo0lJ8Oi4xWbfUI+KuVlDMJEdtMwmrjI slKUMPVJ+IMQwesn+lISNFhMAG+9XrOchP4tBwNysQGZIPITAZKogSYVYqKGzEnZoEyL KgANT7QOEUIkm+DowdZ+qPIE40AhROHn7ffwYIf/YtJ/13NTmCMZGr35LGXzPu/aPoT0 LsGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684895187; x=1687487187; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RECNaUh/nKqVFPcbCgavk+v688GOwa63uXMue1K0zos=; b=Y/X5cbZw+XBmNxDbSEthc74kJToJWgTzXN2P1R9s041LO1jyBozcG83b0Ebigj1bFv vHSSWUdDTYtkEnYbTGCdCpnRQYzsLmIC5y2uqBiOiJuUKSsB3FRFwBqgLgqBj0G/HJ5K Sd28oW79NLVoWMKHFsbnop1I+uN9bBndJKm2LsmJOSzVPEhG8Qj1gqcSu/dMA+3KFNDY +C1LOGcHl/gIc6fQyAoPBpr51AUhKF+nXDsHwqKt4tPdGKdV8fBIqWgT8o5xDxFv0aQS 1XHjXA4oJk3BSfKD23N/Tr9VfBwGr9Z6c9v0wCq0aYcqRz1PGyS4n3lPZsLiGfXpkYsp w2VA== X-Gm-Message-State: AC+VfDziihfIa+/Kld1qzTP+NI1S67yMppCA7ryGTShycocYvZDqQqDp rBP2myv+W+OV0JWSK0LNq+BacbsVgtxV7xQjj+lG+Q/5EOdARzYD X-Google-Smtp-Source: ACHHUZ51kSnyav9fi7LiPtQQG6RSv6xfGyvzfjL0WVrqwWkxRqibPIptcEMl8cg2cSCZDKs0xKPkjMqbyLeV4vpFC3A= X-Received: by 2002:a2e:9251:0:b0:2af:2fb0:9238 with SMTP id v17-20020a2e9251000000b002af2fb09238mr4032178ljg.16.1684895187207; Tue, 23 May 2023 19:26:27 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Tue, 23 May 2023 21:26:16 -0500 Message-ID: Subject: SMB1 mount fix from Paulo To: CIFS Cc: Paulo Alcantara Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Fix from Paulo attached for SMB1 mount error (and merged into cifs-2.6.git for-next). See attached. cifs.ko maps NT_STATUS_NOT_FOUND to -EIO when SMB1 servers couldn't resolve referral paths. Proceed to tree connect when we get -EIO from dfs_get_referral() as well. From 52067f0ce38cf11dae51a3f99de99e1a3ebe94c5 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Tue, 23 May 2023 17:38:38 -0300 Subject: [PATCH 2/6] cifs: fix smb1 mount regression cifs.ko maps NT_STATUS_NOT_FOUND to -EIO when SMB1 servers couldn't resolve referral paths. Proceed to tree connect when we get -EIO from dfs_get_referral() as well. Reported-by: Kris Karas (Bug Reporting) Fixes: 8e3554150d6c ("cifs: fix sharing of DFS connections") Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French --- fs/cifs/dfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/dfs.c b/fs/cifs/dfs.c index a93dbca1411b..2f93bf8c3325 100644 --- a/fs/cifs/dfs.c +++ b/fs/cifs/dfs.c @@ -303,7 +303,7 @@ int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx, bool *isdfs) if (!nodfs) { rc = dfs_get_referral(mnt_ctx, ctx->UNC + 1, NULL, NULL); if (rc) { - if (rc != -ENOENT && rc != -EOPNOTSUPP) + if (rc != -ENOENT && rc != -EOPNOTSUPP && rc != -EIO) goto out; nodfs = true; } -- 2.34.1