Skip to content
Snippets Groups Projects
  1. Jun 16, 2008
  2. Jun 13, 2008
  3. Jun 12, 2008
    • David S. Miller's avatar
      tcp: Revert 'process defer accept as established' changes. · ec0a1966
      David S. Miller authored
      
      This reverts two changesets, ec3c0982
      ("[TCP]: TCP_DEFER_ACCEPT updates - process as established") and
      the follow-on bug fix 9ae27e0a
      ("tcp: Fix slab corruption with ipv6 and tcp6fuzz").
      
      This change causes several problems, first reported by Ingo Molnar
      as a distcc-over-loopback regression where connections were getting
      stuck.
      
      Ilpo Järvinen first spotted the locking problems.  The new function
      added by this code, tcp_defer_accept_check(), only has the
      child socket locked, yet it is modifying state of the parent
      listening socket.
      
      Fixing that is non-trivial at best, because we can't simply just grab
      the parent listening socket lock at this point, because it would
      create an ABBA deadlock.  The normal ordering is parent listening
      socket --> child socket, but this code path would require the
      reverse lock ordering.
      
      Next is a problem noticed by Vitaliy Gusev, he noted:
      
      ----------------------------------------
      >--- a/net/ipv4/tcp_timer.c
      >+++ b/net/ipv4/tcp_timer.c
      >@@ -481,6 +481,11 @@ static void tcp_keepalive_timer (unsigned long data)
      > 		goto death;
      > 	}
      >
      >+	if (tp->defer_tcp_accept.request && sk->sk_state == TCP_ESTABLISHED) {
      >+		tcp_send_active_reset(sk, GFP_ATOMIC);
      >+		goto death;
      
      Here socket sk is not attached to listening socket's request queue. tcp_done()
      will not call inet_csk_destroy_sock() (and tcp_v4_destroy_sock() which should
      release this sk) as socket is not DEAD. Therefore socket sk will be lost for
      freeing.
      ----------------------------------------
      
      Finally, Alexey Kuznetsov argues that there might not even be any
      real value or advantage to these new semantics even if we fix all
      of the bugs:
      
      ----------------------------------------
      Hiding from accept() sockets with only out-of-order data only
      is the only thing which is impossible with old approach. Is this really
      so valuable? My opinion: no, this is nothing but a new loophole
      to consume memory without control.
      ----------------------------------------
      
      So revert this thing for now.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec0a1966
    • Stefan Schmidt's avatar
      [ARM] 5091/1: Add missing bitfield include to regs-lcd.h · 3692fd0a
      Stefan Schmidt authored
      
      Macros like Fld() or FShft used in regs-lcd.h are defined in bitfield.h, but
      the latter is not included.
      Also fix one whitespace issue while being there.
      
      Signed-off-by: default avatarAntonio Ospite <ao2@openezx.org>
      Signed-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
      Acked-by: default avatarEric Miao <eric.miao@marvell.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      3692fd0a
    • Jeremy Fitzhardinge's avatar
      always_inline timespec_add_ns · 9412e286
      Jeremy Fitzhardinge authored
      
      timespec_add_ns is used from the x86-64 vdso, which cannot call out to
      other kernel code.  Make sure that timespec_add_ns is always inlined
      (and only uses always_inlined functions) to make sure there are no
      unexpected calls.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9412e286
    • Jeremy Fitzhardinge's avatar
      add an inlined version of iter_div_u64_rem · d5e181f7
      Jeremy Fitzhardinge authored
      
      iter_div_u64_rem is used in the x86-64 vdso, which cannot call other
      kernel code.  For this case, provide the always_inlined version,
      __iter_div_u64_rem.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d5e181f7
    • Jeremy Fitzhardinge's avatar
      common implementation of iterative div/mod · f595ec96
      Jeremy Fitzhardinge authored
      
      We have a few instances of the open-coded iterative div/mod loop, used
      when we don't expcet the dividend to be much bigger than the divisor.
      Unfortunately modern gcc's have the tendency to strength "reduce" this
      into a full mod operation, which isn't necessarily any faster, and
      even if it were, doesn't exist if gcc implements it in libgcc.
      
      The workaround is to put a dummy asm statement in the loop to prevent
      gcc from performing the transformation.
      
      This patch creates a single implementation of this loop, and uses it
      to replace the open-coded versions I know about.
      
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Christian Kujau <lists@nerdbynature.de>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f595ec96
  4. Jun 11, 2008
  5. Jun 10, 2008
  6. Jun 09, 2008
  7. Jun 08, 2008
  8. Jun 06, 2008
  9. Jun 05, 2008
Loading