1. 02 7月, 2011 1 次提交
  2. 28 6月, 2011 2 次提交
  3. 10 6月, 2011 1 次提交
  4. 14 5月, 2011 1 次提交
  5. 11 5月, 2011 1 次提交
  6. 09 5月, 2011 5 次提交
  7. 07 5月, 2011 3 次提交
  8. 05 5月, 2011 1 次提交
  9. 04 5月, 2011 1 次提交
  10. 29 4月, 2011 1 次提交
    • E
      inet: add RCU protection to inet->opt · f6d8bd05
      Eric Dumazet 提交于
      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: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6d8bd05
  11. 31 3月, 2011 2 次提交
  12. 13 3月, 2011 5 次提交
  13. 03 3月, 2011 1 次提交
  14. 02 3月, 2011 6 次提交
  15. 13 12月, 2010 2 次提交
    • D
      ipv4: Don't pre-seed hoplimit metric. · 323e126f
      David S. Miller 提交于
      Always go through a new ip4_dst_hoplimit() helper, just like ipv6.
      
      This allowed several simplifications:
      
      1) The interim dst_metric_hoplimit() can go as it's no longer
         userd.
      
      2) The sysctl_ip_default_ttl entry no longer needs to use
         ipv4_doint_and_flush, since the sysctl is not cached in
         routing cache metrics any longer.
      
      3) ipv4_doint_and_flush no longer needs to be exported and
         therefore can be marked static.
      
      When ipv4_doint_and_flush_strategy was removed some time ago,
      the external declaration in ip.h was mistakenly left around
      so kill that off too.
      
      We have to move the sysctl_ip_default_ttl declaration into
      ipv4's route cache definition header net/route.h, because
      currently net/ip.h (where the declaration lives now) has
      a back dependency on net/route.h
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      323e126f
    • D
      5170ae82
  16. 18 11月, 2010 1 次提交
  17. 25 9月, 2010 1 次提交
    • E
      ip: take care of last fragment in ip_append_data · 59104f06
      Eric Dumazet 提交于
      While investigating a bit, I found ip_fragment() slow path was taken
      because ip_append_data() provides following layout for a send(MTU +
      N*(MTU - 20)) syscall :
      
      - one skb with 1500 (mtu) bytes
      - N fragments of 1480 (mtu-20) bytes (before adding IP header)
      last fragment gets 17 bytes of trail data because of following bit:
      
      	if (datalen == length + fraggap)
      		alloclen += rt->dst.trailer_len;
      
      Then esp4 adds 16 bytes of data (while trailer_len is 17... hmm...
      another bug ?)
      
      In ip_fragment(), we notice last fragment is too big (1496 + 20) > mtu,
      so we take slow path, building another skb chain.
      
      In order to avoid taking slow path, we should correct ip_append_data()
      to make sure last fragment has real trail space, under mtu...
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59104f06
  18. 22 9月, 2010 1 次提交
    • E
      ip: fix truesize mismatch in ip fragmentation · 3d13008e
      Eric Dumazet 提交于
      Special care should be taken when slow path is hit in ip_fragment() :
      
      When walking through frags, we transfert truesize ownership from skb to
      frags. Then if we hit a slow_path condition, we must undo this or risk
      uncharging frags->truesize twice, and in the end, having negative socket
      sk_wmem_alloc counter, or even freeing socket sooner than expected.
      
      Many thanks to Nick Bowler, who provided a very clean bug report and
      test program.
      
      Thanks to Jarek for reviewing my first patch and providing a V2
      
      While Nick bisection pointed to commit 2b85a34e (net: No more
      expensive sock_hold()/sock_put() on each tx), underlying bug is older
      (2.6.12-rc5)
      
      A side effect is to extend work done in commit b2722b1c
      (ip_fragment: also adjust skb->truesize for packets not owned by a
      socket) to ipv6 as well.
      Reported-and-bisected-by: NNick Bowler <nbowler@elliptictech.com>
      Tested-by: NNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      CC: Jarek Poplawski <jarkao2@gmail.com>
      CC: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d13008e
  19. 25 8月, 2010 1 次提交
  20. 23 8月, 2010 1 次提交
  21. 19 8月, 2010 1 次提交
  22. 03 8月, 2010 1 次提交