* [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid()
@ 2023-12-29 12:45 Markus Elfring
2024-01-02 12:32 ` Benjamin Coddington
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2023-12-29 12:45 UTC (permalink / raw)
To: linux-nfs, kernel-janitors, Anna Schumaker, Trond Myklebust; +Cc: LKML
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid()
2023-12-29 12:45 [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid() Markus Elfring
@ 2024-01-02 12:32 ` Benjamin Coddington
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Coddington @ 2024-01-02 12:32 UTC (permalink / raw)
To: Markus Elfring
Cc: linux-nfs, kernel-janitors, Anna Schumaker, Trond Myklebust, LKML
On 29 Dec 2023, at 7:45, Markus Elfring wrote:
> 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>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-02 12:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 12:45 [PATCH] rpc_pipefs: Replace one label in bl_resolve_deviceid() Markus Elfring
2024-01-02 12:32 ` Benjamin Coddington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox