[IRDA]: Fix rfcomm use-after-free
[pandora-kernel.git] / net / ipv4 / fib_rules.c
index fe29b98..2a94784 100644 (file)
@@ -169,7 +169,7 @@ static struct fib_table *fib_empty_table(void)
        return NULL;
 }
 
-static struct nla_policy fib4_rule_policy[FRA_MAX+1] __read_mostly = {
+static const struct nla_policy fib4_rule_policy[FRA_MAX+1] = {
        FRA_GENERIC_POLICY,
        [FRA_FLOW]      = { .type = NLA_U32 },
 };
@@ -300,7 +300,7 @@ static size_t fib4_rule_nlmsg_payload(struct fib_rule *rule)
 
 static void fib4_rule_flush_cache(void)
 {
-       rt_cache_flush(0);
+       rt_cache_flush(-1);
 }
 
 static struct fib_rules_ops fib4_rules_ops = {