From: Yibin Ding <Yibin.Ding@unisoc.com>
To: <djakov@kernel.org>, <gregkh@linuxfoundation.org>, <rafael@kernel.org>
Cc: <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: [PATCH V2 0/2] Added debugfs node initialization and null pointer detection.
Date: Sat, 14 Sep 2024 18:24:18 +0800 [thread overview]
Message-ID: <20240914102418.3879203-1-Yibin.Ding@unisoc.com> (raw)
From: Yibin Ding <Yibin.ding@unisoc.com>
The two debugfs nodes (/sys/kernel/debug/interconnect/test_client/dst_node,
src_node) do not initialize the character pointers before creation. For
such uninitialized nodes, direct access will cause a crash due to accessing
a null pointer.
For example, directly execute the following command after booting:
cat /sys/kernel/debug/interconnect/test_client/dst_node.
Therefore, for the problem nodes, it is necessary to add initialization
operations and null pointer detection when accessing.
Yibin Ding (2):
interconnect: Add character pointer initialization
debugfs: Fix crash problem caused by accessing uninitialized nodes
drivers/interconnect/debugfs-client.c | 9 +++++++--
fs/debugfs/file.c | 4 ++++
2 files changed, 11 insertions(+), 2 deletions(-)
--
2.25.1
next reply other threads:[~2024-09-14 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 10:24 Yibin Ding [this message]
2024-09-14 13:57 ` [PATCH V2 0/2] Added debugfs node initialization and null pointer detection Greg KH
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=20240914102418.3879203-1-Yibin.Ding@unisoc.com \
--to=yibin.ding@unisoc.com \
--cc=Hao_hao.Wang@unisoc.com \
--cc=Ke.Wang@unisoc.com \
--cc=djakov@kernel.org \
--cc=gregkh@linuxfoundation.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