All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: add NULL check for ses->tcon_ipc
@ 2020-12-03 18:46 Aurélien Aptel
  2020-12-03 18:54 ` Paulo Alcantara
  0 siblings, 1 reply; 2+ messages in thread
From: Aurélien Aptel @ 2020-12-03 18:46 UTC (permalink / raw)
  To: linux-cifs; +Cc: smfrench, Aurelien Aptel

From: Aurelien Aptel <aaptel@suse.com>

In some scenarios (DFS and BAD_NETWORK_NAME) set_root_set() can be
called with a NULL ses->tcon_ipc.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
---
 fs/cifs/connect.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 28c1459fb0fc0..44f9cce570995 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4546,7 +4546,8 @@ static void set_root_ses(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
 	if (ses) {
 		spin_lock(&cifs_tcp_ses_lock);
 		ses->ses_count++;
-		ses->tcon_ipc->remap = cifs_remap(cifs_sb);
+		if (ses->tcon_ipc)
+			ses->tcon_ipc->remap = cifs_remap(cifs_sb);
 		spin_unlock(&cifs_tcp_ses_lock);
 	}
 	*root_ses = ses;
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cifs: add NULL check for ses->tcon_ipc
  2020-12-03 18:46 [PATCH] cifs: add NULL check for ses->tcon_ipc Aurélien Aptel
@ 2020-12-03 18:54 ` Paulo Alcantara
  0 siblings, 0 replies; 2+ messages in thread
From: Paulo Alcantara @ 2020-12-03 18:54 UTC (permalink / raw)
  To: Aurélien Aptel, linux-cifs; +Cc: smfrench, Aurelien Aptel

Aurélien Aptel <aaptel@suse.com> writes:

> From: Aurelien Aptel <aaptel@suse.com>
>
> In some scenarios (DFS and BAD_NETWORK_NAME) set_root_set() can be
> called with a NULL ses->tcon_ipc.
>
> Signed-off-by: Aurelien Aptel <aaptel@suse.com>
> ---
>  fs/cifs/connect.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-03 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 18:46 [PATCH] cifs: add NULL check for ses->tcon_ipc Aurélien Aptel
2020-12-03 18:54 ` Paulo Alcantara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.