From: Dominique Martinet <asmadeus@codewreck.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: v9fs@lists.linux.dev, kernel-janitors@vger.kernel.org,
"Christian Schönebeck" <linux_oss@crudebyte.com>,
"Eric Van Hensbergen" <ericvh@kernel.org>,
"Latchesar Ionkov" <lucho@ionkov.net>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/9p: Improve exception handling in v9fs_session_init()
Date: Mon, 8 Jan 2024 20:09:30 +0900 [thread overview]
Message-ID: <ZZvX6sQLkgm0kOTN@codewreck.org> (raw)
In-Reply-To: <7203d3fc-f1e4-4fb1-8dd3-068b0ec6c752@web.de>
Markus Elfring wrote on Thu, Dec 28, 2023 at 09:01:49PM +0100:
> The kfree() function was called in up to two cases by
> the v9fs_session_init() function during error handling
> even if the passed variable contained a null pointer.
I don't see the problem in calling kfree on null things (especially on
error path).
The only bad pattern I see here is that it relies on implicit
knowledge that aname is null before the call (which is true because
v9fs_session_init is only called immediately after kzalloc); is that
what your coccinelle script was checking for?
Anyway, as far as I'm concerned this is more churn than it's worth, but
I'll defer to Eric if he wants to take it.
Thanks,
--
Dominique
next prev parent reply other threads:[~2024-01-08 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 20:01 [PATCH] fs/9p: Improve exception handling in v9fs_session_init() Markus Elfring
2024-01-08 11:09 ` Dominique Martinet [this message]
2024-01-08 12:15 ` Markus Elfring
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=ZZvX6sQLkgm0kOTN@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=Markus.Elfring@web.de \
--cc=ericvh@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=v9fs@lists.linux.dev \
/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