On Wed, 03 Dec 2014 15:41:21 +0300 Andrey Ryabinin <a.ryabinin@xxxxxxxxxxx> wrote:
Use the 'unsigned long' type for 'zero' variable to fix this.
Changing type to 'unsigned long' shouldn't affect any other users
of this variable.
Reported-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
Fixes: ed4d4902ebdd ("mm, hugetlb: remove hugetlb_zero and hugetlb_infinity")
Signed-off-by: Andrey Ryabinin <a.ryabinin@xxxxxxxxxxx>
---
kernel/sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 15f2511..45c45c9 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -120,7 +120,7 @@ static int sixty = 60;
static int __maybe_unused neg_one = -1;
-static int zero;
+static unsigned long zero;
if ((min && val < *min) || (max && val > *max))
continue;