This is a note to let you know that I've just added the patch titled smb3: add missing null server pointer check to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: smb3-add-missing-null-server-pointer-check.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 45be0882c5f91e1b92e645001dd1a53b3bd58c97 Mon Sep 17 00:00:00 2001 From: Steve French <stfrench@xxxxxxxxxxxxx> Date: Mon, 5 Feb 2024 14:43:17 -0600 Subject: smb3: add missing null server pointer check From: Steve French <stfrench@xxxxxxxxxxxxx> commit 45be0882c5f91e1b92e645001dd1a53b3bd58c97 upstream. Address static checker warning in cifs_ses_get_chan_index(): warn: variable dereferenced before check 'server' To be consistent, and reduce risk, we should add another check for null server pointer. Fixes: 88675b22d34e ("cifs: do not search for channel if server is terminating") Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/smb/client/sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -76,7 +76,7 @@ cifs_ses_get_chan_index(struct cifs_ses unsigned int i; /* if the channel is waiting for termination */ - if (server->terminate) + if (server && server->terminate) return CIFS_INVAL_CHAN_INDEX; for (i = 0; i < ses->chan_count; i++) { Patches currently in stable-queue which might be from stfrench@xxxxxxxxxxxxx are queue-6.6/smb-work-around-clang-__bdos-type-confusion.patch queue-6.6/cifs-open_cached_dir-should-not-rely-on-primary-chan.patch queue-6.6/cifs-translate-network-errors-on-send-to-econnaborte.patch queue-6.6/smb-client-increase-number-of-pdus-allowed-in-a-comp.patch queue-6.6/cifs-handle-cases-where-multiple-sessions-share-conn.patch queue-6.6/smb3-clarify-mount-warning.patch queue-6.6/cifs-make-sure-that-channel-scaling-is-done-only-onc.patch queue-6.6/smb-client-set-correct-d_type-for-reparse-points-und.patch queue-6.6/cifs-helper-function-to-check-replayable-error-codes.patch queue-6.6/cifs-change-tcon-status-when-need_reconnect-is-set-o.patch queue-6.6/cifs-do-not-search-for-channel-if-server-is-terminat.patch queue-6.6/cifs-cifs_pick_channel-should-try-selecting-active-c.patch queue-6.6/smb3-add-missing-null-server-pointer-check.patch