From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christine Caulfield <ccaulfie@redhat.com>,
Alexander Aring <aahringo@redhat.com>
Cc: David Teigland <teigland@redhat.com>,
cluster-devel@redhat.com, kernel-janitors@vger.kernel.org
Subject: [PATCH] fs: dlm: uninitialized variable on error in dlm_listen_for_all()
Date: Sat, 15 Jan 2022 14:47:25 +0300 [thread overview]
Message-ID: <20220115114725.GA7552@kili> (raw)
The "sock" variable is not initialized on this error path.
Cc: stable@vger.kernel.org
Fixes: 2dc6b1158c28 ("fs: dlm: introduce generic listen")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
fs/dlm/lowcomms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index e284d696c1fd..6ed935ad8247 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1789,7 +1789,7 @@ static int dlm_listen_for_all(void)
SOCK_STREAM, dlm_proto_ops->proto, &sock);
if (result < 0) {
log_print("Can't create comms socket: %d", result);
- goto out;
+ return result;
}
sock_set_mark(sock->sk, dlm_config.ci_mark);
--
2.20.1
reply other threads:[~2022-01-15 11:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220115114725.GA7552@kili \
--to=dan.carpenter@oracle.com \
--cc=aahringo@redhat.com \
--cc=ccaulfie@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=teigland@redhat.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;
as well as URLs for NNTP newsgroup(s).