linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gro: Fix kcalloc argument order
@ 2013-01-26 19:24 Joe Perches
  2013-01-28  0:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2013-01-26 19:24 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML, Eric Dumazet

First number, then size.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/net/gro_cells.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
index e5062c9..734d9b5 100644
--- a/include/net/gro_cells.h
+++ b/include/net/gro_cells.h
@@ -73,8 +73,8 @@ static inline int gro_cells_init(struct gro_cells *gcells, struct net_device *de
 	int i;
 
 	gcells->gro_cells_mask = roundup_pow_of_two(netif_get_num_default_rss_queues()) - 1;
-	gcells->cells = kcalloc(sizeof(struct gro_cell),
-				gcells->gro_cells_mask + 1,
+	gcells->cells = kcalloc(gcells->gro_cells_mask + 1,
+				sizeof(struct gro_cell),
 				GFP_KERNEL);
 	if (!gcells->cells)
 		return -ENOMEM;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gro: Fix kcalloc argument order
  2013-01-26 19:24 [PATCH] gro: Fix kcalloc argument order Joe Perches
@ 2013-01-28  0:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-28  0:13 UTC (permalink / raw)
  To: joe; +Cc: netdev, linux-kernel, eric.dumazet

From: Joe Perches <joe@perches.com>
Date: Sat, 26 Jan 2013 11:24:19 -0800

> First number, then size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Good catch, since this bug doesn't cause any real functional problem
I've applied the patch to net-next.

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-28  0:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-26 19:24 [PATCH] gro: Fix kcalloc argument order Joe Perches
2013-01-28  0:13 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).