Files
kernel-tenderloin-3.0/include/net
Eric Dumazet f6d8bd051c inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options

Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.

Another thread can change inet->opt pointer and free old one under us.

Use RCU to protect inet->opt (changed to inet->inet_opt).

Instead of handling atomic refcounts, just copy ip_options when
necessary, to avoid cache line dirtying.

We cant insert an rcu_head in struct ip_options since its included in
skb->cb[], so this patch is large because I had to introduce a new
ip_options_rcu structure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-28 13:16:35 -07:00
..
2011-03-31 11:26:23 -03:00
2011-04-11 15:08:47 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-27 13:14:06 -07:00
2010-12-31 10:47:46 -08:00
2010-06-03 03:21:52 -07:00
2010-10-27 11:37:32 -07:00
2010-10-25 13:09:44 -07:00
2011-03-31 11:26:23 -03:00
2010-12-19 21:59:35 -08:00
2010-09-23 14:33:39 -07:00
2010-10-25 13:09:45 -07:00
2011-04-28 13:16:35 -07:00
2010-10-27 11:37:32 -07:00
2011-03-31 11:26:23 -03:00
2009-12-26 20:46:28 -08:00
2010-06-03 03:21:52 -07:00
2011-03-15 09:36:50 +09:00
2011-03-31 11:26:23 -03:00
2011-01-24 15:32:47 -08:00
2011-04-27 13:59:05 -07:00
2010-11-24 11:16:43 -08:00
2011-03-01 12:35:03 -08:00
2011-03-01 12:35:03 -08:00
2009-10-07 16:39:43 -04:00
2011-03-31 11:26:23 -03:00
2010-11-28 11:12:20 -08:00
2011-04-22 11:04:14 -07:00