mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
The debugfs_create_str() API assumes that the string pointer is either NULL
or points to valid kmalloc() memory. Leaving the pointer uninitialized can
cause problems.
Initialize src_node and dst_node to empty strings before creating the
debugfs entries to guarantee that reads and writes are safe.
Fixes: 770c69f037 ("interconnect: Add debugfs test client")
Signed-off-by: Georgi Djakov <[email protected]>
Reviewed-by: Kuan-Wei Chiu <[email protected]>
Tested-by: Kuan-Wei Chiu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Georgi Djakov <[email protected]>