lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbf26021-798a-41a7-840e-62c8d383bb93@web.de>
Date: Fri, 29 Dec 2023 13:45:06 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-nfs@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Anna Schumaker <anna@...nel.org>,
 Trond Myklebust <trond.myklebust@...merspace.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid()

From: Markus Elfring <elfring@...rs.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@...rs.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ