Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFSD: Make nfsd_genl_rqstp::rq_ops array best-effort

To enable NFSD to handle NFSv4 COMPOUNDs of unrestricted size,
resize the array in struct nfsd_genl_rqstp so it saves only up to
16 operations per COMPOUND.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Chuck Lever a2d61427 71bc2c6c

+3 -2
+2 -1
fs/nfsd/nfsctl.c
··· 1569 1569 int j; 1570 1570 1571 1571 args = rqstp->rq_argp; 1572 - genl_rqstp.rq_opcnt = args->opcnt; 1572 + genl_rqstp.rq_opcnt = min_t(u32, args->opcnt, 1573 + ARRAY_SIZE(genl_rqstp.rq_opnum)); 1573 1574 for (j = 0; j < genl_rqstp.rq_opcnt; j++) 1574 1575 genl_rqstp.rq_opnum[j] = 1575 1576 args->ops[j].opnum;
+1 -1
fs/nfsd/nfsd.h
··· 72 72 73 73 /* NFSv4 compound */ 74 74 u32 rq_opcnt; 75 - u32 rq_opnum[NFSD_MAX_OPS_PER_COMPOUND]; 75 + u32 rq_opnum[16]; 76 76 }; 77 77 78 78 extern struct svc_program nfsd_programs[];