mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ad1984e844
commit
e242297055
4 changed files with 6 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ static struct dst_ops ip6_dst_ops = {
|
|||
.update_pmtu = ip6_rt_update_pmtu,
|
||||
.local_out = ip6_local_out,
|
||||
.entry_size = sizeof(struct rt6_info),
|
||||
.entries = ATOMIC_INIT(0),
|
||||
};
|
||||
|
||||
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 = {
|
|||
.check = ip6_dst_check,
|
||||
.update_pmtu = ip6_rt_blackhole_update_pmtu,
|
||||
.entry_size = sizeof(struct rt6_info),
|
||||
.entries = ATOMIC_INIT(0),
|
||||
};
|
||||
|
||||
struct rt6_info ip6_null_entry = {
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ static struct dst_ops xfrm6_dst_ops = {
|
|||
.local_out = __ip6_local_out,
|
||||
.gc_thresh = 1024,
|
||||
.entry_size = sizeof(struct xfrm_dst),
|
||||
.entries = ATOMIC_INIT(0),
|
||||
};
|
||||
|
||||
static struct xfrm_policy_afinfo xfrm6_policy_afinfo = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue