summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-01-30 20:07:45 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-31 19:27:23 -0800
commite242297055f906e8e225fb95a8edbc88e9052634 (patch)
treed0fb2d3ba0273bd621681b8de7621ee9b73baf44 /net/ipv4/route.c
parentad1984e844fb6edaa8b9984be23669f4e19168be (diff)
downloadblackbird-op-linux-e242297055f906e8e225fb95a8edbc88e9052634.tar.gz
blackbird-op-linux-e242297055f906e8e225fb95a8edbc88e9052634.zip
[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/ipv4/route.c')
-rw-r--r--net/ipv4/route.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 896c768e41a2..163086b2f058 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -169,6 +169,7 @@ static struct dst_ops ipv4_dst_ops = {
.update_pmtu = ip_rt_update_pmtu,
.local_out = ip_local_out,
.entry_size = sizeof(struct rtable),
+ .entries = ATOMIC_INIT(0),
};
#define ECN_OR_COST(class) TC_PRIO_##class
@@ -2498,6 +2499,7 @@ static struct dst_ops ipv4_dst_blackhole_ops = {
.check = ipv4_dst_check,
.update_pmtu = ipv4_rt_blackhole_update_pmtu,
.entry_size = sizeof(struct rtable),
+ .entries = ATOMIC_INIT(0),
};
OpenPOWER on IntegriCloud