diff options
-rw-r--r-- | net/core/fib_rules.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 42e84e08a1be..d0787284cb07 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -225,9 +225,11 @@ jumped: | |||
225 | err = ops->action(rule, fl, flags, arg); | 225 | err = ops->action(rule, fl, flags, arg); |
226 | 226 | ||
227 | if (err != -EAGAIN) { | 227 | if (err != -EAGAIN) { |
228 | fib_rule_get(rule); | 228 | if (likely(atomic_inc_not_zero(&rule->refcnt))) { |
229 | arg->rule = rule; | 229 | arg->rule = rule; |
230 | goto out; | 230 | goto out; |
231 | } | ||
232 | break; | ||
231 | } | 233 | } |
232 | } | 234 | } |
233 | 235 | ||