NFSD: Rewrite synopsis of nfsd_percpu_counters_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chuck Lever <chuck.lever@xxxxxxxxxx>

[ Upstream commit 5ec39944f874e1ecc09f624a70dfaa8ac3bf9d08 ]

In function â??export_stats_initâ??,
    inlined from â??svc_export_allocâ?? at fs/nfsd/export.c:866:6:
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);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/export.c:337:16: note: referencing argument 1 of type â??struct percpu_counter[0]â??
fs/nfsd/stats.h: In function â??svc_export_allocâ??:
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@xxxxxxxxx>
Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
Stable-dep-of: 93483ac5fec6 ("nfsd: expose /proc/net/sunrpc/nfsd in net namespaces")
Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/nfsd/stats.c |    2 +-
 fs/nfsd/stats.h |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/fs/nfsd/stats.c
+++ b/fs/nfsd/stats.c
@@ -76,7 +76,7 @@ static int nfsd_show(struct seq_file *se
 
 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;
 
--- 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);
 


Patches currently in stable-queue which might be from kroah.com@xxxxxxxxxxxxxxx are

queue-6.6/nfsd-remove-nfsd_stats-make-th_cnt-a-global-counter.patch
queue-6.6/sunrpc-remove-pg_stats-from-svc_program.patch
queue-6.6/nfsd-make-all-of-the-nfsd-stats-per-network-namespace.patch
queue-6.6/nfsd-stop-setting-pg_stats-for-unused-stats.patch
queue-6.6/sunrpc-don-t-change-sv_stats-if-it-doesn-t-exist.patch
queue-6.6/nfsd-make-svc_stat-per-network-namespace-instead-of-global.patch
queue-6.6/nfsd-fix-frame-size-warning-in-svc_export_parse.patch
queue-6.6/nfsd-rename-nfsd_net_-to-nfsd_stats_.patch
queue-6.6/sunrpc-use-the-struct-net-as-the-svc-proc-private.patch
queue-6.6/sunrpc-pass-in-the-sv_stats-struct-through-svc_create_pooled.patch
queue-6.6/nfsd-rewrite-synopsis-of-nfsd_percpu_counters_init.patch
queue-6.6/nfsd-expose-proc-net-sunrpc-nfsd-in-net-namespaces.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux