svn commit: r343351 - in stable: 11/sys/fs/nfsserver 12/sys/fs/nfsserver
Mark Johnston
markj at FreeBSD.org
Wed Jan 23 17:40:14 UTC 2019
Author: markj
Date: Wed Jan 23 17:40:12 2019
New Revision: 343351
URL: https://svnweb.freebsd.org/changeset/base/343351
Log:
MFC r343286:
nfs: Zero the buffers exported by NFSSVC_DUMPCLIENTS and DUMPLOCKS.
admbugs: 765
Modified:
stable/12/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
stable/12/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/11/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/12/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/12/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 23 17:36:58 2019 (r343350)
+++ stable/12/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 23 17:40:12 2019 (r343351)
@@ -3615,8 +3615,7 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *u
error = EPERM;
if (!error) {
len = sizeof (struct nfsd_dumpclients) * dumplist.ndl_size;
- dumpclients = (struct nfsd_dumpclients *)malloc(len,
- M_TEMP, M_WAITOK);
+ dumpclients = malloc(len, M_TEMP, M_WAITOK | M_ZERO);
nfsrv_dumpclients(dumpclients, dumplist.ndl_size);
error = copyout(dumpclients,
CAST_USER_ADDR_T(dumplist.ndl_list), len);
@@ -3634,8 +3633,7 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *u
if (!error) {
len = sizeof (struct nfsd_dumplocks) *
dumplocklist.ndllck_size;
- dumplocks = (struct nfsd_dumplocks *)malloc(len,
- M_TEMP, M_WAITOK);
+ dumplocks = malloc(len, M_TEMP, M_WAITOK | M_ZERO);
nfsrv_dumplocks(nd.ni_vp, dumplocks,
dumplocklist.ndllck_size, p);
vput(nd.ni_vp);
More information about the svn-src-all
mailing list