[PATCH v2 4/6] mm/page_owner: add missing newline to count_threshold format string

From: Ye Liu

Date: Thu Jun 25 2026 - 22:46:38 EST


The DEFINE_SIMPLE_ATTRIBUTE format string for page_owner_threshold_fops
is missing a trailing \n. simple_attr_read() uses scnprintf() with the
format string, which does not append a newline, so reading
/sys/kernel/debug/page_owner_stacks/count_threshold produces output
without a terminating newline. Add the missing \n to match the
standard debugfs attribute convention.

Signed-off-by: Ye Liu <ye.liu@xxxxxxxxx>
---
mm/page_owner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index 5d8773c90cd9..958151ccb587 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -981,7 +981,7 @@ static int page_owner_threshold_set(void *data, u64 val)
}

DEFINE_SIMPLE_ATTRIBUTE(page_owner_threshold_fops, &page_owner_threshold_get,
- &page_owner_threshold_set, "%llu");
+ &page_owner_threshold_set, "%llu\n");


static int __init pageowner_init(void)
--
2.43.0