From: Andrew Morton <akpm@linux-foundation.org>
To: Kassey Li <quic_yingangl@quicinc.com>
Cc: linux-kernel@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH] mm/cma_debug.c: align the name buffer length as struct cma
Date: Tue, 19 Jul 2022 16:18:36 -0700 [thread overview]
Message-ID: <20220719161836.b0ad5cdfb0aec0c04a862122@linux-foundation.org> (raw)
In-Reply-To: <20220719091554.27864-1-quic_yingangl@quicinc.com>
On Tue, 19 Jul 2022 17:15:54 +0800 Kassey Li <quic_yingangl@quicinc.com> wrote:
> Signed-off-by: Kassey Li <quic_yingangl@quicinc.com>
> ---
> mm/cma_debug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma_debug.c b/mm/cma_debug.c
> index 2e7704955f4f..c3ffe253e055 100644
> --- a/mm/cma_debug.c
> +++ b/mm/cma_debug.c
> @@ -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);
Seems logical. But as CMA_MAX_NAME=64, this could result in alteration
of the output: less truncation of the original name.
Is it the case that the output is never >16 chars anyway? If so, we'll
be OK.
next prev parent reply other threads:[~2022-07-19 23:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 9:15 [PATCH] mm/cma_debug.c: align the name buffer length as struct cma Kassey Li
2022-07-19 23:18 ` Andrew Morton [this message]
2022-07-20 10:45 ` Kassey Li (QUIC)
2022-07-20 17:02 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220719161836.b0ad5cdfb0aec0c04a862122@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=quic_yingangl@quicinc.com \
--cc=sashal@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).