From: Markus Elfring <Markus.Elfring@web.de>
To: Andrew Morton <akpm@linux-foundation.org>,
Daniel Axtens <dja@axtens.net>,
Uladzislau Rezki <urezki@gmail.com>,
kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>
Subject: [PATCH] mm/vmalloc: Use more common error handling code in pcpu_get_vm_areas()
Date: Tue, 16 Jun 2026 18:14:52 +0200 [thread overview]
Message-ID: <453375c4-c3ca-4e6f-8880-0e6ff3c74ee3@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jun 2026 18:00:16 +0200
Use an existing label once more so that a bit of exception handling can be
better reused at the end of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
mm/vmalloc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 1afca3568b9b..21a890586fef 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -5198,9 +5198,7 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
kfree(vms[area]);
}
spin_unlock(&free_vmap_area_lock);
- kfree(vas);
- kfree(vms);
- return NULL;
+ goto err_free2;
}
/**
--
2.54.0
next reply other threads:[~2026-06-16 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 16:14 Markus Elfring [this message]
2026-06-16 17:35 ` [PATCH] mm/vmalloc: Use more common error handling code in pcpu_get_vm_areas() Uladzislau Rezki
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=453375c4-c3ca-4e6f-8880-0e6ff3c74ee3@web.de \
--to=markus.elfring@web.de \
--cc=akpm@linux-foundation.org \
--cc=dja@axtens.net \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=urezki@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.