diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-28 14:31:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-28 22:26:00 -0700 |
commit | cf91166223772ef4a2ed98b9874958bf6a2470df (patch) | |
tree | f8c86cc60798db9e4469031a8dceb5fcb512fb81 /net/xfrm | |
parent | 5c1e6aa300a7a669dc469d2dcb20172c6bd8fed9 (diff) | |
download | linux-cf91166223772ef4a2ed98b9874958bf6a2470df.tar.bz2 |
net: Use non-zero allocations in dst_alloc().
Make dst_alloc() and it's users explicitly initialize the entire
entry.
The zero'ing done by kmem_cache_zalloc() was almost entirely
redundant.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 70552c4e2272..00bcb88386c2 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1349,6 +1349,7 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) BUG(); } xdst = dst_alloc(dst_ops, NULL, 0, 0, 0); + memset(&xdst->u.rt6.rt6i_table, 0, sizeof(*xdst) - sizeof(struct dst_entry)); xfrm_policy_put_afinfo(afinfo); if (likely(xdst)) |