1. 18 1月, 2006 4 次提交
    • V
      [SCTP]: Fix sctp_assoc_seq_show() panics on big-endian systems. · 38b0e42a
      Vlad Yasevich 提交于
      This patch corrects the panic by casting the argument to the
      pointer of correct size.  On big-endian systems we ended up loading
      only 32 bits of data because we are treating the pointer as an int*.
      By treating this pointer as loff_t*, we'll load the full 64 bits
      and then let regular integer demotion take place which will give us
      the correct value.
      Signed-off-by: NVlad Yaseivch <vladislav.yasevich@hp.com>
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      38b0e42a
    • V
      [SCTP]: sctp doesn't show all associations/endpoints in /proc · 49392e5e
      Vlad Yasevich 提交于
      When creating a very large number of associations (and endpoints),
      /proc/assocs and /proc/eps will not show all of them.  As a result
      netstat will not show all of the either.  This is particularly evident
      when creating 1000+ associations (or endpoints).  As an example with
      1500 tcp style associations over loopback, netstat showed 1420 on my
      system instead of 3000.
      
      The reason for this is that the seq_operations start method is invoked
      multiple times bacause of the amount of data that is provided.  The
      start method always increments the position parameter and since we use
      the position as the hash bucket id, we end up skipping hash buckets.
      
      This patch corrects this situation and get's rid of the silly hash-1
      decrement.
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      49392e5e
    • V
      [SCTP]: Fix sctp_cookie alignment in the packet. · 9834a2bb
      Vlad Yasevich 提交于
      On 64 bit architectures, sctp_cookie sent as part of INIT-ACK is not
      aligned on a 64 bit boundry and thus causes unaligned access exceptions.
      
      The layout of the cookie prameter is this:
      |<----- Parameter Header --------------------|<--- Cookie DATA --------
      -----------------------------------------------------------------------
      | param type (16 bits) | param len (16 bits) | sig [32 bytes] | cookie..
      -----------------------------------------------------------------------
      
      The cookie data portion contains 64 bit values on 64 bit architechtures
      (timeval) that fall on a 32 bit alignment boundry when used as part of
      the on-wire format, but align correctly when used in internal
      structures.  This patch explicitely pads the on-wire format so that
      it is properly aligned.
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      9834a2bb
    • S
      [SCTP]: Fix potential race condition between sctp_close() and sctp_rcv(). · 7a48f923
      Sridhar Samudrala 提交于
      Do not release the reference to association/endpoint if an incoming skb is
      added to backlog. Instead release it after the chunk is processed in
      sctp_backlog_rcv().
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      7a48f923
  2. 17 1月, 2006 36 次提交