View | Details | Raw Unified | Return to bug 260012
Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdserv.c (+6 lines)
Lines 4945-4950 nfsrvd_layoutreturn(struct nfsrv_descript *nd, __unuse Link Here
4945
		}
4945
		}
4946
4946
4947
		maxcnt = fxdr_unsigned(int, *tl);
4947
		maxcnt = fxdr_unsigned(int, *tl);
4948
		/*
4949
		 * There is no fixed upper bound defined in the RFCs,
4950
		 * but 128Kbytes should be more than sufficient.
4951
		 */
4952
		if (maxcnt < 0 || maxcnt > 131072)
4953
			maxcnt = 0;
4948
		if (maxcnt > 0) {
4954
		if (maxcnt > 0) {
4949
			layp = malloc(maxcnt + 1, M_TEMP, M_WAITOK);
4955
			layp = malloc(maxcnt + 1, M_TEMP, M_WAITOK);
4950
			error = nfsrv_mtostr(nd, (char *)layp, maxcnt);
4956
			error = nfsrv_mtostr(nd, (char *)layp, maxcnt);
(-)sys/fs/nfsserver/nfs_nfsdstate.c (-1 / +1 lines)
Lines 7290-7296 nfsrv_layoutreturn(struct nfsrv_descript *nd, vnode_t Link Here
7290
			}
7290
			}
7291
			NFSDRECALLUNLOCK();
7291
			NFSDRECALLUNLOCK();
7292
		}
7292
		}
7293
		if (layouttype == NFSLAYOUT_FLEXFILE)
7293
		if (layouttype == NFSLAYOUT_FLEXFILE && layp != NULL)
7294
			nfsrv_flexlayouterr(nd, layp, maxcnt, p);
7294
			nfsrv_flexlayouterr(nd, layp, maxcnt, p);
7295
	} else if (kind == NFSV4LAYOUTRET_FSID)
7295
	} else if (kind == NFSV4LAYOUTRET_FSID)
7296
		nfsrv_freelayouts(&nd->nd_clientid,
7296
		nfsrv_freelayouts(&nd->nd_clientid,

Return to bug 260012