From: Alexey Dobriyan <adobriyan@xxxxxxxxx> Subject: slub: make size_from_object() return unsigned int Function returns size of the object without red zone which can't be negative. Link: http://lkml.kernel.org/r/20180305200730.15812-24-adobriyan@xxxxxxxxx Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Acked-by: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/slub.c~slub-make-size_from_object-return-unsigned-int mm/slub.c --- a/mm/slub.c~slub-make-size_from_object-return-unsigned-int +++ a/mm/slub.c @@ -466,7 +466,7 @@ static void get_map(struct kmem_cache *s set_bit(slab_index(p, s, addr), map); } -static inline int size_from_object(struct kmem_cache *s) +static inline unsigned int size_from_object(struct kmem_cache *s) { if (s->flags & SLAB_RED_ZONE) return s->size - s->red_left_pad; _ -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html