On Mon, 2014-06-16 at 20:12 +0200, Fabian Frederick wrote: > kcalloc manages count*sizeof overflow.
so does kmalloc_array > diff --git a/fs/squashfs/file_direct.c b/fs/squashfs/file_direct.c [] > - page = kmalloc(sizeof(void *) * pages, GFP_KERNEL); > + page = kcalloc(pages, sizeof(void *), GFP_KERNEL); kmalloc(a * sizeof(b), GFP) -> kmalloc_array(a, sizeof(b), GFP) kzalloc(a * sizeof(b), GFP) -> kcalloc(a, sizeof(b), GFP) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/