Skip to content

Commit

Permalink
mm/cma_debug.c: align the name buffer length as struct cma
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Kassey Li <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Minchan Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Kassey Li authored and akpm00 committed Jul 30, 2022
1 parent 3d5367a commit 198729c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/cma_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ DEFINE_DEBUGFS_ATTRIBUTE(cma_alloc_fops, NULL, cma_alloc_write, "%llu\n");
static void cma_debugfs_add_one(struct cma *cma, struct dentry *root_dentry)
{
struct dentry *tmp;
char name[16];
char name[CMA_MAX_NAME];

scnprintf(name, sizeof(name), "cma-%s", cma->name);

Expand Down

0 comments on commit 198729c

Please sign in to comment.