From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, linux-nfs@vger.kernel.org
Cc: Amir Goldstein <amir73il@gmail.com>,
Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH RFC 1/2] NFSD: Rewrite synopsis of nfsd_percpu_counters_init()
Date: Mon, 02 Oct 2023 09:42:04 -0400 [thread overview]
Message-ID: <9062843a7d70cf3e17d7eb9295783fcf7789c588.camel@kernel.org> (raw)
In-Reply-To: <169618110986.65416.1447879517809565525.stgit@manet.1015granger.net>
On Sun, 2023-10-01 at 13:25 -0400, Chuck Lever wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> In function ‘export_stats_init’,
> inlined from ‘svc_export_alloc’ at /home/cel/src/linux/server-development/fs/nfsd/export.c:866:6:
> /home/cel/src/linux/server-development/fs/nfsd/export.c:337:16: warning: ‘nfsd_percpu_counters_init’ accessing 40 bytes in a region of size 0 [-Wstringop-overflow=]
> 337 | return nfsd_percpu_counters_init(&stats->counter, EXP_STATS_COUNTERS_NUM);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/cel/src/linux/server-development/fs/nfsd/export.c:337:16: note: referencing argument 1 of type ‘struct percpu_counter[0]’
> /home/cel/src/linux/server-development/fs/nfsd/stats.h: In function ‘svc_export_alloc’:
> /home/cel/src/linux/server-development/fs/nfsd/stats.h:40:5: note: in a call to function ‘nfsd_percpu_counters_init’
> 40 | int nfsd_percpu_counters_init(struct percpu_counter counters[], int num);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfsd/stats.c | 2 +-
> fs/nfsd/stats.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
> index 63797635e1c3..12c299a05433 100644
> --- a/fs/nfsd/stats.c
> +++ b/fs/nfsd/stats.c
> @@ -76,7 +76,7 @@ static int nfsd_show(struct seq_file *seq, void *v)
>
> DEFINE_PROC_SHOW_ATTRIBUTE(nfsd);
>
> -int nfsd_percpu_counters_init(struct percpu_counter counters[], int num)
> +int nfsd_percpu_counters_init(struct percpu_counter *counters, int num)
> {
> int i, err = 0;
>
> diff --git a/fs/nfsd/stats.h b/fs/nfsd/stats.h
> index cf5524e7ca06..a3e9e2f47ec4 100644
> --- a/fs/nfsd/stats.h
> +++ b/fs/nfsd/stats.h
> @@ -37,9 +37,9 @@ extern struct nfsd_stats nfsdstats;
>
> extern struct svc_stat nfsd_svcstats;
>
> -int nfsd_percpu_counters_init(struct percpu_counter counters[], int num);
> -void nfsd_percpu_counters_reset(struct percpu_counter counters[], int num);
> -void nfsd_percpu_counters_destroy(struct percpu_counter counters[], int num);
> +int nfsd_percpu_counters_init(struct percpu_counter *counters, int num);
> +void nfsd_percpu_counters_reset(struct percpu_counter *counters, int num);
> +void nfsd_percpu_counters_destroy(struct percpu_counter *counters, int num);
> int nfsd_stat_init(void);
> void nfsd_stat_shutdown(void);
>
>
>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-10-02 13:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 17:25 [PATCH RFC 0/2] Reduce size of stack frame in svc_export_parse() Chuck Lever
2023-10-01 17:25 ` [PATCH RFC 1/2] NFSD: Rewrite synopsis of nfsd_percpu_counters_init() Chuck Lever
2023-10-02 13:42 ` Jeff Layton [this message]
2023-10-01 17:25 ` [PATCH RFC 2/2] NFSD: Fix frame size warning in svc_export_parse() Chuck Lever
2023-10-02 13:49 ` Jeff Layton
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=9062843a7d70cf3e17d7eb9295783fcf7789c588.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=amir73il@gmail.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.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).