From: Greg KH <gregkh@linuxfoundation.org>
To: Yibin Ding <Yibin.Ding@unisoc.com>
Cc: djakov@kernel.org, rafael@kernel.org, yibin.ding01@gmail.com,
niuzhiguo84@gmail.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, Hao_hao.Wang@unisoc.com,
Ke.Wang@unisoc.com
Subject: Re: [PATCH V2 1/2] interconnect: Add character pointer initialization
Date: Sat, 14 Sep 2024 15:56:58 +0200 [thread overview]
Message-ID: <2024091454-shrouded-dynamite-7253@gregkh> (raw)
In-Reply-To: <20240914102435.3879355-1-Yibin.Ding@unisoc.com>
On Sat, Sep 14, 2024 at 06:24:35PM +0800, Yibin Ding wrote:
> From: Yibin Ding <Yibin.ding@unisoc.com>
>
> When accessing a node whose data type is a character pointer and has not
> been initialized, a crash will occur due to accessing a null pointer. So
> it is necessary to add the operation of initializing the character pointer.
> Since the debugfs_write_file_str() function performs a kfree() operation
> on the node data, memory is allocated to the node pointer during
> initialization will be released when data is written to the node.
But if no data is ever written this ends up being a memory leak. Please
do not fix one bug just to introduce another one.
> Signed-off-by: Yibin Ding <Yibin.ding@unisoc.com>
also, your patches are not in a series together for some reason, and
there's no information below the --- line showing what changed from the
previous version where I pointed out this very problem :(
greg k-h
prev parent reply other threads:[~2024-09-14 13:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 10:24 [PATCH V2 1/2] interconnect: Add character pointer initialization Yibin Ding
2024-09-14 13:56 ` Greg KH [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=2024091454-shrouded-dynamite-7253@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Hao_hao.Wang@unisoc.com \
--cc=Ke.Wang@unisoc.com \
--cc=Yibin.Ding@unisoc.com \
--cc=djakov@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=niuzhiguo84@gmail.com \
--cc=rafael@kernel.org \
--cc=yibin.ding01@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox