archive mirror
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <>
To: Steve French <>, CIFS <>
Cc: Paulo Alcantara <>, ronnie sahlberg <>
Subject: Re: [PATCH] cifs: missing null pointer check in cifs_mount
Date: Wed, 23 Jun 2021 13:48:24 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Steve French <> writes:
> We weren't checking if tcon is null before setting dfs path,
> although we check for null tcon in an earlier assignment statement.

If tcon is NULL there is no point in continuing in that function, we
should have exited earlier.

If tcon is NULL it means mount_get_conns() failed so presumably rc will
be != 0 and we would goto error.

I don't think this is needed. We could change the existing check after
the loop to this you really want to be safe:

	if (rc || !tcon)
		goto error;

Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)

  reply	other threads:[~2021-06-23 11:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23  1:17 [PATCH] cifs: missing null pointer check in cifs_mount Steve French
2021-06-23 11:48 ` Aurélien Aptel [this message]
2021-06-23 12:17   ` Paulo Alcantara
2021-06-24  0:34     ` Steve French
2023-08-11 13:16       ` Jeff Layton
2023-08-11 15:15         ` Paulo Alcantara
2023-08-11 16:26           ` Jeff Layton
2023-08-11 16:49             ` Paulo Alcantara
2023-08-11 16:58               ` Jeff Layton
2023-08-11 17:06                 ` Paulo Alcantara
2023-08-15 14:25                 ` Jeff Layton
2023-08-15 18:35                   ` Paulo Alcantara

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:

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

  git send-email \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).