Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm/cma_debug.c: align the name buffer length as struct cma

Avoids truncating the debugfs output to 16 chars. Potentially alters
the userspace output, but this is a debugfs interface and there are no
stability guarantees.

Link: https://lkml.kernel.org/r/20220719091554.27864-1-quic_yingangl@quicinc.com
Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kassey Li and committed by
akpm
198729c9 3d5367a0

+1 -1
+1 -1
mm/cma_debug.c
··· 163 163 static void cma_debugfs_add_one(struct cma *cma, struct dentry *root_dentry) 164 164 { 165 165 struct dentry *tmp; 166 - char name[16]; 166 + char name[CMA_MAX_NAME]; 167 167 168 168 scnprintf(name, sizeof(name), "cma-%s", cma->name); 169 169