diff options
-rw-r--r-- | include/linux/slab.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h index 8cf52939d0a..38bed95dda7 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -118,7 +118,7 @@ extern void *kzalloc(size_t, gfp_t); */ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) { - if (n != 0 && size > INT_MAX / n) + if (n != 0 && size > ULONG_MAX / n) return NULL; return kzalloc(n * size, flags); } |