path: root/hugeadm.c
diff options
authorEric B Munson <emunson@mgebm.net>2010-09-22 21:29:28 -0600
committerEric B Munson <emunson@mgebm.net>2010-09-24 09:56:37 -0600
commitbc5359fbc9522e1e406db979824770e6040e5984 (patch)
treea374e1379cd3721ca2519a8d75792e9882119eab /hugeadm.c
parentef60eda96851e26f74dac2f0d826c01f597bf886 (diff)
Fix pool adjust when using negative delta
hugeadm has always accepted deltas for adjusting huge page pool sizes, but when support was added for 16G page sizes an unsigned value was used. This causes problems when a negative delta is used, instead of shrinking the pool, the pool size is set to a very large number, usually crippling the machine as the kernel attempts to use all of the memory as huge pages. This patch changes the value to a signed long long which is still large enough to hold a 16G page size. Signed-off-by: Eric B Munson <emunson@mgebm.net>
Diffstat (limited to 'hugeadm.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/hugeadm.c b/hugeadm.c
index 5800cfe..fe5f89f 100644
--- a/hugeadm.c
+++ b/hugeadm.c
@@ -1047,7 +1047,7 @@ enum {
static long value_adjust(char *adjust_str, long base, long page_size)
- unsigned long long adjust;
+ long long adjust;
char *iter;
/* Convert and validate the adjust. */