kernel-ark/net/dccp
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
..
ccids tcp: Increase the initial congestion window to 10. 2011-02-02 20:48:47 -08:00
ackvec.c
ackvec.h
ccid.c
ccid.h
dccp.h dccp: fix bug in updating the GSR 2011-01-07 12:22:43 +01:00
diag.c
feat.c
feat.h
input.c dccp: fix oops on Reset after close 2011-03-01 23:02:07 -08:00
ipv4.c inet: add RCU protection to inet->opt 2011-04-28 13:16:35 -07:00
ipv6.c inet: add RCU protection to inet->opt 2011-04-28 13:16:35 -07:00
ipv6.h
Kconfig
Makefile dccp: Policy-based packet dequeueing infrastructure 2010-12-07 13:47:12 +01:00
minisocks.c
options.c
output.c Fix common misspellings 2011-03-31 11:26:23 -03:00
probe.c
proto.c dccp qpolicy: Parameter checking of cmsg qpolicy parameters 2010-12-07 13:47:12 +01:00
qpolicy.c dccp qpolicy: Parameter checking of cmsg qpolicy parameters 2010-12-07 13:47:12 +01:00
sysctl.c dccp: make upper bound for seq_window consistent on 32/64 bit 2011-01-07 12:22:44 +01:00
timer.c