]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
interconnect: debugfs: initialize src_node and dst_node to empty strings
authorGeorgi Djakov <djakov@kernel.org>
Fri, 9 Jan 2026 12:25:23 +0000 (14:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:35 +0000 (10:27 +0100)
commitaa79a5a959c7c414bd6fba01ea8dbaddd44f13e7
tree575488e294c0ac46787683e4cfc751f847c7fa3d
parentce8d8a3368128af0ba308bda3923d0aa32152867
interconnect: debugfs: initialize src_node and dst_node to empty strings

[ Upstream commit 8cc27f5c6dd17dd090f3a696683f04336c162ff5 ]

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: 770c69f037c1 ("interconnect: Add debugfs test client")
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Tested-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Link: https://lore.kernel.org/r/20260109122523.125843-1-djakov@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/interconnect/debugfs-client.c