All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 4/5] ipv6: use kcalloc
Date: Tue, 22 Jul 2008 14:29:31 -0700	[thread overview]
Message-ID: <20080722212951.798632347@vyatta.com> (raw)
In-Reply-To: 20080722212927.937523165@vyatta.com

[-- Attachment #1: ipv6-kcalloc.patch --]
[-- Type: text/plain, Size: 634 bytes --]

Th fib_table_hash is an array, so use kcalloc.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/net/ipv6/ip6_fib.c	2008-07-21 12:21:15.000000000 -0700
+++ b/net/ipv6/ip6_fib.c	2008-07-21 12:21:15.000000000 -0700
@@ -1481,9 +1481,9 @@ static int fib6_net_init(struct net *net
 	if (!net->ipv6.rt6_stats)
 		goto out_timer;
 
-	net->ipv6.fib_table_hash =
-		kzalloc(sizeof(*net->ipv6.fib_table_hash)*FIB_TABLE_HASHSZ,
-			GFP_KERNEL);
+	net->ipv6.fib_table_hash = kcalloc(FIB_TABLE_HASHSZ,
+					   sizeof(*net->ipv6.fib_table_hash),
+					   GFP_KERNEL);
 	if (!net->ipv6.fib_table_hash)
 		goto out_rt6_stats;
 

-- 


  parent reply	other threads:[~2008-07-22 21:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080722212927.937523165@vyatta.com>
2008-07-22 21:29 ` [PATCH 1/5] netns: dont alloc ipv6 fib timer list Stephen Hemminger
2008-07-22 21:33   ` David Miller
2008-07-22 21:29 ` [PATCH 2/5] ipv6: use round_jiffies Stephen Hemminger
2008-07-22 21:34   ` David Miller
2008-07-22 21:29 ` [PATCH 3/5] ipv6: use spin_trylock_bh Stephen Hemminger
2008-07-22 21:34   ` David Miller
2008-07-28  2:46   ` [PATCH] IPv6:Fix the return value of Set Hop-by-Hop options header with NULL data pointer Yang Hongyang
2008-07-22 21:29 ` Stephen Hemminger [this message]
2008-07-22 21:35   ` [PATCH 4/5] ipv6: use kcalloc David Miller
2008-07-22 21:29 ` [PATCH 5/5] ipv6: icmp6_dst_gc return change Stephen Hemminger
2008-07-22 21:35   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080722212951.798632347@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.