Skip to content

Added debugfs node initialization and null pointer detection.

Yibin Ding linux-pm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2interconnect: Add character pointer initializationdrivers/interconnect/debugfs-client.c+7 -21 reply
2/2debugfs: Fix crash problem caused by accessing uninitialized nodesfs/debugfs/file.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/2] Added debugfs node initialization and null pointer detection.

From: Yibin Ding <[email protected]>

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(-)
Signature · 1 line
2.25.1