diff options
Diffstat (limited to 'include/linux/slab.h')
-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 8cf52939d0ab..38bed95dda7a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -118,7 +118,7 @@ extern void *kzalloc(size_t, gfp_t); | |||
118 | */ | 118 | */ |
119 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) | 119 | static inline void *kcalloc(size_t n, size_t size, gfp_t flags) |
120 | { | 120 | { |
121 | if (n != 0 && size > INT_MAX / n) | 121 | if (n != 0 && size > ULONG_MAX / n) |
122 | return NULL; | 122 | return NULL; |
123 | return kzalloc(n * size, flags); | 123 | return kzalloc(n * size, flags); |
124 | } | 124 | } |