1. 29 1月, 2008 9 次提交
  2. 26 1月, 2008 1 次提交
    • R
      IPoIB: improve IPv4/IPv6 to IB mcast mapping functions · a9e527e3
      Rolf Manderscheid 提交于
      An IPoIB subnet on an IB fabric that spans multiple IB subnets can't
      use link-local scope in multicast GIDs.  The existing routines that
      map IP/IPv6 multicast addresses into IB link-level addresses hard-code
      the scope to link-local, and they also leave the partition key field
      uninitialised.  This patch adds a parameter (the link-level broadcast
      address) to the mapping routines, allowing them to initialise both the
      scope and the P_Key appropriately, and fixes up the call sites.
      
      The next step will be to add a way to configure the scope for an IPoIB
      interface.
      Signed-off-by: NRolf Manderscheid <rvm@obsidianresearch.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      a9e527e3
  3. 09 1月, 2008 4 次提交
  4. 27 12月, 2007 2 次提交
  5. 21 12月, 2007 1 次提交
  6. 07 12月, 2007 2 次提交
  7. 29 11月, 2007 1 次提交
  8. 26 11月, 2007 1 次提交
    • P
      [IPV4]: Fix memory leak in inet_hashtables.h when NUMA is on · 218ad12f
      Pavel Emelyanov 提交于
      The inet_ehash_locks_alloc() looks like this:
      
      #ifdef CONFIG_NUMA
      	if (size > PAGE_SIZE)
      		x = vmalloc(...);
      	else
      #endif
      		x = kmalloc(...);
      
      Unlike it, the inet_ehash_locks_alloc() looks like this:
      
      #ifdef CONFIG_NUMA
      	if (size > PAGE_SIZE)
      		vfree(x);
      	else
      #else
      		kfree(x);
      #endif
      
      The error is obvious - if the NUMA is on and the size
      is less than the PAGE_SIZE we leak the pointer (kfree is
      inside the #else branch).
      
      Compiler doesn't warn us because after the kfree(x) there's
      a "x = NULL" assignment, so here's another (minor?) bug: we 
      don't set x to NULL under certain circumstances.
      
      Boring explanation, I know... Patch explains it better.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      218ad12f
  9. 21 11月, 2007 1 次提交
  10. 20 11月, 2007 4 次提交
  11. 19 11月, 2007 1 次提交
    • H
      [TCP]: Fix TCP header misalignment · 21df56c6
      Herbert Xu 提交于
      Indeed my previous change to alloc_pskb has made it possible
      for the TCP header to be misaligned iff the MTU is not a multiple
      of 4 (and less than a page).  So I suspect the optimised IPsec
      MTU calculation is giving you just such an MTU :)
      
      This patch fixes it by changing alloc_pskb to make sure that
      the size is at least 32-bit aligned.  This does not cause the
      problem fixed by the previous patch because max_header is always
      32-bit aligned which means that in the SG/NOTSO case this will
      be a no-op.
      
      I thought about putting this in the callers but all the current
      callers are from TCP.  If and when we get a non-TCP caller we
      can always create a TCP wrapper for this function and move the
      alignment over there.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21df56c6
  12. 15 11月, 2007 2 次提交
    • P
      [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue · dab6ba36
      Pavel Emelyanov 提交于
      The request_sock_queue's listen_opt is either vmalloc-ed or
      kmalloc-ed depending on the number of table entries. Thus it 
      is expected to be handled properly on free, which is done in 
      the reqsk_queue_destroy().
      
      However the error path in inet_csk_listen_start() calls 
      the lite version of reqsk_queue_destroy, called 
      __reqsk_queue_destroy, which calls the kfree unconditionally. 
      
      Fix this and move the __reqsk_queue_destroy into a .c file as 
      it looks too big to be inline.
      
      As David also noticed, this is an error recovery path only,
      so no locking is required and the lopt is known to be not NULL.
      
      reqsk_queue_yank_listen_sk is also now only used in
      net/core/request_sock.c so we should move it there too.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: NEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dab6ba36
    • H
      [TCP]: Fix size calculation in sk_stream_alloc_pskb · fb93134d
      Herbert Xu 提交于
      We round up the header size in sk_stream_alloc_pskb so that
      TSO packets get zero tail room.  Unfortunately this rounding
      up is not coordinated with the select_size() function used by
      TCP to calculate the second parameter of sk_stream_alloc_pskb.
      
      As a result, we may allocate more than a page of data in the
      non-TSO case when exactly one page is desired.
      
      In fact, rounding up the head room is detrimental in the non-TSO
      case because it makes memory that would otherwise be available to
      the payload head room.  TSO doesn't need this either, all it wants
      is the guarantee that there is no tail room.
      
      So this patch fixes this by adjusting the skb_reserve call so that
      exactly the requested amount (which all callers have calculated in
      a precise way) is made available as tail room.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb93134d
  13. 13 11月, 2007 3 次提交
  14. 11 11月, 2007 6 次提交
  15. 10 11月, 2007 2 次提交