On Wed, Jan 30, 2013 at 05:23:29PM +0100, Greg KH wrote:
> How is the size the same both ways? Is the count always somehow the
> same value as the size of the structure? How is that possible? Luck?

static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)
{
        if (size != 0 && n > SIZE_MAX / size)
                return NULL;
        return __kmalloc(n * size, flags);
}

It doesn't matter what 'size' and what 'n' is.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to