From: Eric Dumazet Date: Mon, 27 Sep 2010 04:18:27 +0000 (+0000) Subject: fib: use atomic_inc_not_zero() in fib_rules_lookup X-Git-Tag: v2.6.37-rc1~147^2~342 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa7cb7109d07c29ab28bb877bc7049a0150dbe5;p=pandora-kernel.git fib: use atomic_inc_not_zero() in fib_rules_lookup It seems we dont use appropriate refcount increment in an rcu_read_lock() protected section. fib_rule_get() might increment a null refcount and bad things could happen. While fib_nl_delrule() respects an rcu grace period before calling fib_rule_put(), fib_rules_cleanup_ops() calls fib_rule_put() without a grace period. Note : after this patch, we might avoid the synchronize_rcu() call done in fib_nl_delrule() Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed