On Wed, 2013-01-30 at 17:23 +0100, Greg KH wrote:
> On Wed, Jan 30, 2013 at 07:52:26AM -0800, Joe Perches wrote:
> > On Wed, 2013-01-30 at 13:46 +0100, [email protected] wrote:
> > > This is a note to let you know that I've just added the patch titled
> > >
> > > EDAC: Fix kcalloc argument order
> > >
> > > to the 3.7-stable tree which can be found at:
> > >
> > > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > Hey Greg.
> >
> > There isn't really any need to add
> > this to stable. It fixes a cosmetic,
> > code correctness bug only.
> >
> > The computed alloc size is the same
> > regardless of the argument order.
>
> 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?
kcalloc is an inline to kmalloc_array()
It really just multiplies the 2 numbers together.
Given the inputs, it always returns __kmalloc.
Add it to stable if you want, it just doesn't
fix anything but a cosmetic defect.
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);
}
--
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