mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shyam Prasad <Shyam.Prasad@microsoft.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"samba-technical@lists.samba.org"
	<samba-technical@lists.samba.org>,
	"lkft-triage@lists.linaro.org" <lkft-triage@lists.linaro.org>,
	Maciek Borzecki <maciek.borzecki@gmail.com>,
	Wan Jiabing <wanjiabing@vivo.com>,
	Steven French <Steven.French@microsoft.com>, pc <pc@cjr.nz>,
	Pavel Shilovskiy <pshilov@microsoft.com>,
	Steve French <sfrench@samba.org>
Subject: RE: [EXTERNAL] [next] ERROR: modpost: "dns_query" [fs/cifs/cifs.ko] undefined
Date: Fri, 9 Apr 2021 17:57:04 +0000	[thread overview]
Message-ID: <PSAP153MB0422295B47CE0D299103585C94739@PSAP153MB0422.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CA+G9fYuNHTscCZDwGnxv5axibgUw1iRKQ4RJrJxHQpSNrQPaBg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Attached the latest version of the patch.

Regards,
Shyam

-----Original Message-----
From: Naresh Kamboju <naresh.kamboju@linaro.org> 
Sent: Friday, April 9, 2021 11:24 PM
To: Shyam Prasad <Shyam.Prasad@microsoft.com>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>; samba-technical@lists.samba.org; lkft-triage@lists.linaro.org; Maciek Borzecki <maciek.borzecki@gmail.com>; Wan Jiabing <wanjiabing@vivo.com>; Steven French <Steven.French@microsoft.com>; pc <pc@cjr.nz>; Pavel Shilovskiy <pshilov@microsoft.com>; Steve French <sfrench@samba.org>
Subject: Re: [EXTERNAL] [next] ERROR: modpost: "dns_query" [fs/cifs/cifs.ko] undefined

On Fri, 9 Apr 2021 at 23:17, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> On Fri, 9 Apr 2021 at 21:49, Shyam Prasad <Shyam.Prasad@microsoft.com> wrote:
> >
> > Hi Naresh,
> >
> > AFAIK, this has been fixed in an updated patch last evening. Can you please check if you're still seeing it?
>
> Please share the fix commit and subject here.
>
> FYI,

ignore the below statement.
our build system did not trigger today tag yet.

> This build error is still on today's Linux next tag 20210409.

- Naresh

[-- Attachment #2: 4e456b30f78c429b183db420e23b26cde7e03a78.patch --]
[-- Type: application/octet-stream, Size: 4033 bytes --]

commit 4e456b30f78c429b183db420e23b26cde7e03a78
Author: Shyam Prasad N <sprasad@microsoft.com>
Date:   Wed Mar 31 14:35:24 2021 +0000

    cifs: On cifs_reconnect, resolve the hostname again.
    
    On cifs_reconnect, make sure that DNS resolution happens again.
    It could be the cause of connection to go dead in the first place.
    
    This also contains the fix for a build issue identified by Intel bot.
    Reported-by: kernel test robot <lkp@intel.com>
    
    Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
    Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
    CC: <stable@vger.kernel.org> # 5.11+
    Signed-off-by: Steve French <stfrench@microsoft.com>

diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index fe03cbdae959..bf52e9326ebe 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -18,6 +18,7 @@ config CIFS
 	select CRYPTO_AES
 	select CRYPTO_LIB_DES
 	select KEYS
+	select DNS_RESOLVER
 	help
 	  This is the client VFS module for the SMB3 family of NAS protocols,
 	  (including support for the most recent, most secure dialect SMB3.1.1)
@@ -112,7 +113,6 @@ config CIFS_WEAK_PW_HASH
 config CIFS_UPCALL
 	bool "Kerberos/SPNEGO advanced session setup"
 	depends on CIFS
-	select DNS_RESOLVER
 	help
 	  Enables an upcall mechanism for CIFS which accesses userspace helper
 	  utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
@@ -179,7 +179,6 @@ config CIFS_DEBUG_DUMP_KEYS
 config CIFS_DFS_UPCALL
 	bool "DFS feature support"
 	depends on CIFS
-	select DNS_RESOLVER
 	help
 	  Distributed File System (DFS) support is used to access shares
 	  transparently in an enterprise name space, even if the share
diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
index 5213b20843b5..3ee3b7de4ded 100644
--- a/fs/cifs/Makefile
+++ b/fs/cifs/Makefile
@@ -10,13 +10,14 @@ cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
 	  cifs_unicode.o nterr.o cifsencrypt.o \
 	  readdir.o ioctl.o sess.o export.o smb1ops.o unc.o winucase.o \
 	  smb2ops.o smb2maperror.o smb2transport.o \
-	  smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o
+	  smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \
+	  dns_resolve.o
 
 cifs-$(CONFIG_CIFS_XATTR) += xattr.o
 
 cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
 
-cifs-$(CONFIG_CIFS_DFS_UPCALL) += dns_resolve.o cifs_dfs_ref.o dfs_cache.o
+cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
 
 cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
 
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index eec8a2052da2..24668eb006c6 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -87,7 +87,6 @@ static void cifs_prune_tlinks(struct work_struct *work);
  *
  * This should be called with server->srv_mutex held.
  */
-#ifdef CONFIG_CIFS_DFS_UPCALL
 static int reconn_set_ipaddr_from_hostname(struct TCP_Server_Info *server)
 {
 	int rc;
@@ -124,6 +123,7 @@ static int reconn_set_ipaddr_from_hostname(struct TCP_Server_Info *server)
 	return !rc ? -1 : 0;
 }
 
+#ifdef CONFIG_CIFS_DFS_UPCALL
 /* These functions must be called with server->srv_mutex held */
 static void reconn_set_next_dfs_target(struct TCP_Server_Info *server,
 				       struct cifs_sb_info *cifs_sb,
@@ -321,14 +321,29 @@ cifs_reconnect(struct TCP_Server_Info *server)
 #endif
 
 #ifdef CONFIG_CIFS_DFS_UPCALL
+		if (cifs_sb && cifs_sb->origin_fullpath)
 			/*
 			 * Set up next DFS target server (if any) for reconnect. If DFS
 			 * feature is disabled, then we will retry last server we
 			 * connected to before.
 			 */
 			reconn_set_next_dfs_target(server, cifs_sb, &tgt_list, &tgt_it);
+		else {
+#endif
+			/*
+			 * Resolve the hostname again to make sure that IP address is up-to-date.
+			 */
+			rc = reconn_set_ipaddr_from_hostname(server);
+			if (rc) {
+				cifs_dbg(FYI, "%s: failed to resolve hostname: %d\n",
+						__func__, rc);
+			}
+
+#ifdef CONFIG_CIFS_DFS_UPCALL
+		}
 #endif
 
+
 #ifdef CONFIG_CIFS_SWN_UPCALL
 		}
 #endif

      reply	other threads:[~2021-04-09 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  5:06 Naresh Kamboju
2021-04-09 16:19 ` [EXTERNAL] " Shyam Prasad
2021-04-09 17:47   ` Naresh Kamboju
2021-04-09 17:54     ` Naresh Kamboju
2021-04-09 17:57       ` Shyam Prasad [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PSAP153MB0422295B47CE0D299103585C94739@PSAP153MB0422.APCP153.PROD.OUTLOOK.COM \
    --to=shyam.prasad@microsoft.com \
    --cc=Steven.French@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=maciek.borzecki@gmail.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=pc@cjr.nz \
    --cc=pshilov@microsoft.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=wanjiabing@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®