diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2008-01-30 23:07:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-31 22:27:23 -0500 |
commit | e242297055f906e8e225fb95a8edbc88e9052634 (patch) | |
tree | d0fb2d3ba0273bd621681b8de7621ee9b73baf44 /net/ipv6/route.c | |
parent | ad1984e844fb6edaa8b9984be23669f4e19168be (diff) |
[NET]: should explicitely initialize atomic_t field in struct dst_ops
All but one struct dst_ops static initializations miss explicit
initialization of entries field.
As this field is atomic_t, we should use ATOMIC_INIT(0), and not
rely on atomic_t implementation.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 162cb66d4605..bf6b6652ab79 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -107,6 +107,7 @@ static struct dst_ops ip6_dst_ops = { | |||
107 | .update_pmtu = ip6_rt_update_pmtu, | 107 | .update_pmtu = ip6_rt_update_pmtu, |
108 | .local_out = ip6_local_out, | 108 | .local_out = ip6_local_out, |
109 | .entry_size = sizeof(struct rt6_info), | 109 | .entry_size = sizeof(struct rt6_info), |
110 | .entries = ATOMIC_INIT(0), | ||
110 | }; | 111 | }; |
111 | 112 | ||
112 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) | 113 | static void ip6_rt_blackhole_update_pmtu(struct dst_entry *dst, u32 mtu) |
@@ -120,6 +121,7 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
120 | .check = ip6_dst_check, | 121 | .check = ip6_dst_check, |
121 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 122 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
122 | .entry_size = sizeof(struct rt6_info), | 123 | .entry_size = sizeof(struct rt6_info), |
124 | .entries = ATOMIC_INIT(0), | ||
123 | }; | 125 | }; |
124 | 126 | ||
125 | struct rt6_info ip6_null_entry = { | 127 | struct rt6_info ip6_null_entry = { |