diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6mr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 1446bec895a2..d1008e6891e7 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -692,20 +692,18 @@ static struct mfc6_cache *ip6mr_cache_find(struct in6_addr *origin, struct in6_a | |||
692 | */ | 692 | */ |
693 | static struct mfc6_cache *ip6mr_cache_alloc(void) | 693 | static struct mfc6_cache *ip6mr_cache_alloc(void) |
694 | { | 694 | { |
695 | struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_KERNEL); | 695 | struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL); |
696 | if (c == NULL) | 696 | if (c == NULL) |
697 | return NULL; | 697 | return NULL; |
698 | memset(c, 0, sizeof(*c)); | ||
699 | c->mfc_un.res.minvif = MAXMIFS; | 698 | c->mfc_un.res.minvif = MAXMIFS; |
700 | return c; | 699 | return c; |
701 | } | 700 | } |
702 | 701 | ||
703 | static struct mfc6_cache *ip6mr_cache_alloc_unres(void) | 702 | static struct mfc6_cache *ip6mr_cache_alloc_unres(void) |
704 | { | 703 | { |
705 | struct mfc6_cache *c = kmem_cache_alloc(mrt_cachep, GFP_ATOMIC); | 704 | struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_ATOMIC); |
706 | if (c == NULL) | 705 | if (c == NULL) |
707 | return NULL; | 706 | return NULL; |
708 | memset(c, 0, sizeof(*c)); | ||
709 | skb_queue_head_init(&c->mfc_un.unres.unresolved); | 707 | skb_queue_head_init(&c->mfc_un.unres.unresolved); |
710 | c->mfc_un.unres.expires = jiffies + 10 * HZ; | 708 | c->mfc_un.unres.expires = jiffies + 10 * HZ; |
711 | return c; | 709 | return c; |