Files
linux/include
Eric Dumazet 414bdc2581 filter: fix sk_filter rcu handling
[ Upstream commit 46bcf14f44 ]

Pavel Emelyanov tried to fix a race between sk_filter_(de|at)tach and
sk_clone() in commit 47e958eac2

Problem is we can have several clones sharing a common sk_filter, and
these clones might want to sk_filter_attach() their own filters at the
same time, and can overwrite old_filter->rcu, corrupting RCU queues.

We can not use filter->rcu without being sure no other thread could do
the same thing.

Switch code to a more conventional ref-counting technique : Do the
atomic decrement immediately and queue one rcu call back when last
reference is released.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:27 -08:00
..
2010-09-28 21:38:19 -04:00
2010-09-09 18:57:24 -07:00
2011-01-07 13:58:19 -08:00
2010-08-08 20:58:20 +01:00
2011-01-07 13:58:27 -08:00
2010-08-04 10:44:19 -07:00
2010-06-03 03:21:52 -07:00