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 <emun...@mgebm.net> --- hugeadm.c | 2 +- 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. */ -- 1.7.0.4 ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel