From: Markus Elfring <Markus.Elfring@web.de>
To: vulab@iscas.ac.cn, Peter Rosin <peda@axentia.se>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Kees Cook <kees@kernel.org>,
Thorsten Blum <thorsten.blum@linux.dev>
Subject: Re: [PATCH] mux: fix use-after-free and node leak in mux_get()
Date: Wed, 8 Apr 2026 10:10:56 +0200 [thread overview]
Message-ID: <95fde24d-b15d-4a61-91f4-ba9326c7e614@web.de> (raw)
In-Reply-To: <20260407035306.243905-1-vulab@iscas.ac.cn>
…
> Fix both issues by moving of_node_put(args.np) after all usage of
> args.np, and introducing a common error label "put_and_ret_err" to
> centralize node release.
I imagine that another label can become helpful also for the statement
“ret = -EINVAL;”.
> Also add missing of_node_put() in all error
> path.
You propose to use such a clean-up action for more cases in the implementation
of the function “mux_get”, don't you?
https://elixir.bootlin.com/linux/v7.0-rc7/source/drivers/mux/core.c#L520-L609
How do you think about to increase the application of scope-based resource management?
Regards,
Markus
parent reply other threads:[~2026-04-08 8:11 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260407035306.243905-1-vulab@iscas.ac.cn>]
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=95fde24d-b15d-4a61-91f4-ba9326c7e614@web.de \
--to=markus.elfring@web.de \
--cc=kees@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=thorsten.blum@linux.dev \
--cc=vulab@iscas.ac.cn \
/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