FAILED: Patch "NTB: ntb_transport: Fix too small buffer for debugfs_name" failed to apply to 6.12-stable tree
Subsystems (2)
Sasha Levin
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 6a4b50585d74fe45d3ade1e3e86ba8aae79761a5 Mon Sep 17 00:00:00 2001
From: Koichiro Den <[email protected]>
Date: Wed, 7 Jan 2026 13:24:57 +0900
Subject: [PATCH] NTB: ntb_transport: Fix too small buffer for debugfs_name
The buffer used for "qp%d" was only 4 bytes, which truncates names like "qp10" to "qp1" and causes multiple queues to share the same directory.
Enlarge the buffer and use sizeof() to avoid truncation.
Fixes fce8a7bb5b4b ("PCI-Express Non-Transparent Bridge Support")
Cc <[email protected]> # v3.9+
Reviewed-by Frank Li <[email protected]>
Reviewed-by Dave Jiang <[email protected]>
Signed-off-by Koichiro Den <[email protected]>
Signed-off-by Jon Mason <[email protected]>
--- drivers/ntb/ntb_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ntb/ntb_transport.c +2 -2
@@ -1252,9 +1252,9 @@ static int ntb_transport_init_queue(struct ntb_transport_ctx *nt, qp->tx_max_entry = tx_size / qp->tx_max_frame;if (nt->debugfs_node_dir) { -char debugfs_name[4 ]; +char debugfs_name[8 ]; -snprintf (debugfs_name,4 ,"qp%d" , qp_num); +snprintf (debugfs_name,sizeof (debugfs_name),"qp%d" , qp_num); qp->debugfs_dir =debugfs_create_dir (debugfs_name, nt->debugfs_node_dir);
Signature · 1 line
2.51.0