|
@@ -149,7 +149,15 @@ int dst_discard(struct sk_buff *skb)
|
|
|
}
|
|
|
EXPORT_SYMBOL(dst_discard);
|
|
|
|
|
|
-const u32 dst_default_metrics[RTAX_MAX];
|
|
|
+const u32 dst_default_metrics[RTAX_MAX + 1] = {
|
|
|
+ /* This initializer is needed to force linker to place this variable
|
|
|
+ * into const section. Otherwise it might end into bss section.
|
|
|
+ * We really want to avoid false sharing on this variable, and catch
|
|
|
+ * any writes on it.
|
|
|
+ */
|
|
|
+ [RTAX_MAX] = 0xdeadbeef,
|
|
|
+};
|
|
|
+
|
|
|
|
|
|
void *dst_alloc(struct dst_ops *ops, struct net_device *dev,
|
|
|
int initial_ref, int initial_obsolete, unsigned short flags)
|