Eric Dumazet 46bcf14f44 filter: fix sk_filter rcu handling
Pavel Emelyanov tried to fix a race between sk_filter_(de|at)tach and
sk_clone() in commit 47e958eac280c263397

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>
2010-12-06 09:29:43 -08:00
..
2010-10-12 12:44:53 -03:00
2010-09-23 14:33:39 -07:00
2010-10-17 13:49:14 -07:00
2010-09-23 14:33:39 -07:00
2010-10-16 11:13:24 -07:00
2010-11-29 09:45:15 -08:00
2009-11-04 05:06:25 -08:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-11-10 12:12:00 -08:00
2009-03-21 19:06:54 -07:00
2010-10-27 11:37:31 -07:00
2010-10-27 11:37:32 -07:00
2010-10-25 13:09:44 -07:00
2009-11-04 05:06:25 -08:00
2010-09-23 14:33:39 -07:00
2010-10-27 11:37:33 -07:00
2010-04-13 01:41:33 -07:00
2010-10-25 13:09:45 -07:00
2008-06-11 21:00:38 -07:00
2010-10-27 11:37:32 -07:00
2010-09-23 14:33:39 -07:00
2010-06-03 03:21:52 -07:00
2008-02-29 11:46:17 -08:00
2009-12-26 20:46:28 -08:00
2010-06-03 03:21:52 -07:00
2010-06-03 03:21:52 -07:00
2010-10-25 14:18:27 -07:00
2009-01-06 11:38:15 -07:00
2009-11-20 15:35:04 -08:00
2009-03-21 19:06:50 -07:00
2009-11-04 05:06:25 -08:00
2009-07-26 19:11:14 -07:00
2010-10-21 03:09:45 -07:00
2010-06-30 13:31:19 -07:00
2010-12-06 09:29:43 -08:00
2008-07-05 21:25:39 -07:00
2010-11-10 12:12:00 -08:00
2010-11-10 12:12:00 -08:00
2009-10-07 16:39:43 -04:00
2010-10-27 11:37:32 -07:00