From 64ecd1399ffe48595ca90ece6f76c02350a15243 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 10 Mar 2009 21:28:43 +0000 Subject: - Make maxpipekva a signed long rather than an unsigned long as overflow is more likely to be noticed with signed types. - Make amountpipekva a long as well to match maxpipekva. Discussed with: bde --- sys/kern/subr_param.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/subr_param.c') diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 3ec49e89d4c7..f45a64dbd6fa 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -91,7 +91,7 @@ int nbuf; int nswbuf; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ -u_long maxpipekva; /* Limit on pipe KVA */ +long maxpipekva; /* Limit on pipe KVA */ int vm_guest; /* Running as virtual machine guest? */ u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ @@ -282,7 +282,7 @@ init_param3(long kmempages) maxpipekva = (kmempages / 20) * PAGE_SIZE; if (maxpipekva < 512 * 1024) maxpipekva = 512 * 1024; - TUNABLE_ULONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); + TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva); } /* -- cgit v1.2.3