diff --git a/include/linux/slab.h b/include/linux/slab.h index 8cf52939d0ab676698083140e8cb80384ee6b263..38bed95dda7aaa20a348cc83bc7a87e3c70edb3f 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); }