Date: Mon, 15 Jan 2018 21:14:56 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328021 - head/sys/fs/nfsclient Message-ID: <201801152114.w0FLEuKv065876@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Jan 15 21:14:56 2018 New Revision: 328021 URL: https://svnweb.freebsd.org/changeset/base/328021 Log: nfsclient: make some use of mallocarray(9). Focus on code where we are doing multiplications within malloc(9). None of these ire likely to overflow, however the change is still useful as some static checkers can benefit from the allocation attributes we use for mallocarray. This initial sweep only covers malloc(9) calls with M_NOWAIT. No good reason but I started doing the changes before r327796 and at that time it was convenient to make sure the sorrounding code could handle NULL values. X-Differential revision: https://reviews.freebsd.org/D13837 Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 15 21:13:30 2018 (r328020) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Jan 15 21:14:56 2018 (r328021) @@ -2666,7 +2666,7 @@ ncl_flush(struct vnode *vp, int waitfor, struct thread #define NFS_COMMITBVECSIZ 20 #endif struct buf *bvec_on_stack[NFS_COMMITBVECSIZ]; - int bvecsize = 0, bveccount; + u_int bvecsize = 0, bveccount; if (called_from_renewthread != 0) slptimeo = hz;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801152114.w0FLEuKv065876>