I was not as comfortable with taking out where the error is logged on session setup, but the other parts of the two patches below were fine. So have added them back into for-next after the one small change to " smb: client: stop flooding dmesg on failed session setups" commit e25f5175ef11a56bba4fbfc66832817d59e887c6 (HEAD -> for-next, origin/for-next) Author: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Wed Sep 18 02:04:18 2024 -0300 smb: client: stop flooding dmesg with automounts Avoid logging info and expected errors when automounting DFS links and reparse mount points as a share might contain hundreds of them and the client would end up flooding dmesg. Signed-off-by: Paulo Alcantara (Red Hat) <pc@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> commit 2f34f5e966f7d99418b42b8c67cffbbbde94704b Author: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Wed Sep 18 02:04:12 2024 -0300 smb: client: stop flooding dmesg on failed session setups Stop flooding dmesg over failed session setups as kerberos tickets getting expired or passwords being rotated is a very common scenario. Signed-off-by: Paulo Alcantara (Red Hat) <pc@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> -- Thanks, Steve
From 2f34f5e966f7d99418b42b8c67cffbbbde94704b Mon Sep 17 00:00:00 2001 From: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Wed, 18 Sep 2024 02:04:12 -0300 Subject: [PATCH 1/2] smb: client: stop flooding dmesg on failed session setups Stop flooding dmesg over failed session setups as kerberos tickets getting expired or passwords being rotated is a very common scenario. Signed-off-by: Paulo Alcantara (Red Hat) <pc@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> --- fs/smb/client/connect.c | 2 ++ fs/smb/client/smb2pdu.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c index 15d94ac4095e..48e87f3a7b24 100644 --- a/fs/smb/client/connect.c +++ b/fs/smb/client/connect.c @@ -3374,6 +3374,8 @@ int cifs_mount_get_session(struct cifs_mount_ctx *mnt_ctx) ses = cifs_get_smb_ses(server, ctx); if (IS_ERR(ses)) { rc = PTR_ERR(ses); + if (rc == -ENOKEY && ctx->sectype == Kerberos) + cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n"); ses = NULL; goto out; } diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index b2f16a7b696d..6f7f9a1f0a1f 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -1636,8 +1636,8 @@ SMB2_auth_kerberos(struct SMB2_sess_data *sess_data) spnego_key = cifs_get_spnego_key(ses, server); if (IS_ERR(spnego_key)) { rc = PTR_ERR(spnego_key); - if (rc == -ENOKEY) - cifs_dbg(VFS, "Verify user has a krb5 ticket and keyutils is installed\n"); + cifs_dbg(FYI, "%s: couldn't auth with kerberos: %d\n", + __func__, rc); spnego_key = NULL; goto out; } -- 2.43.0