From: Uladzislau Rezki <urezki@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Daniel Axtens <dja@axtens.net>,
Uladzislau Rezki <urezki@gmail.com>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [PATCH] mm/vmalloc: Use more common error handling code in pcpu_get_vm_areas()
Date: Tue, 16 Jun 2026 19:35:46 +0200 [thread overview]
Message-ID: <ajGJcjK_qknoKTys@pc636> (raw)
In-Reply-To: <453375c4-c3ca-4e6f-8880-0e6ff3c74ee3@web.de>
On Tue, Jun 16, 2026 at 06:14:52PM +0200, Markus Elfring wrote:
> 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
>
More removing then adding!
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
--
Uladzislau Rezki
prev parent reply other threads:[~2026-06-16 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 16:14 [PATCH] mm/vmalloc: Use more common error handling code in pcpu_get_vm_areas() Markus Elfring
2026-06-16 17:35 ` Uladzislau Rezki [this message]
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=ajGJcjK_qknoKTys@pc636 \
--to=urezki@gmail.com \
--cc=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 \
/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