From: Markus Elfring <Markus.Elfring@web.de>
To: linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org,
Anna Schumaker <anna@kernel.org>,
Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid()
Date: Fri, 29 Dec 2023 13:45:06 +0100 [thread overview]
Message-ID: <bbf26021-798a-41a7-840e-62c8d383bb93@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 29 Dec 2023 13:18:56 +0100
The kfree() function was called in one case by
the bl_resolve_deviceid() function during error handling
even if the passed data structure member contained a null pointer.
This issue was detected by using the Coccinelle software.
Thus use an other label.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/nfs/blocklayout/rpc_pipefs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index 6c977288cc28..d8d50a88de04 100644
--- a/fs/nfs/blocklayout/rpc_pipefs.c
+++ b/fs/nfs/blocklayout/rpc_pipefs.c
@@ -75,7 +75,7 @@ bl_resolve_deviceid(struct nfs_server *server, struct pnfs_block_volume *b,
msg->len = sizeof(*bl_msg) + b->simple.len;
msg->data = kzalloc(msg->len, gfp_mask);
if (!msg->data)
- goto out_free_data;
+ goto out_unlock;
bl_msg = msg->data;
bl_msg->type = BL_DEVICE_MOUNT;
--
2.43.0
next reply other threads:[~2023-12-29 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 12:45 Markus Elfring [this message]
2024-01-02 12:32 ` [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid() Benjamin Coddington
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=bbf26021-798a-41a7-840e-62c8d383bb93@web.de \
--to=markus.elfring@web.de \
--cc=anna@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.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