1. 16 7月, 2012 1 次提交
  2. 16 5月, 2012 1 次提交
  3. 05 4月, 2012 1 次提交
    • T
      sctp: Allow struct sctp_event_subscribe to grow without breaking binaries · acdd5985
      Thomas Graf 提交于
      getsockopt(..., SCTP_EVENTS, ...) performs a length check and returns
      an error if the user provides less bytes than the size of struct
      sctp_event_subscribe.
      
      Struct sctp_event_subscribe needs to be extended by an u8 for every
      new event or notification type that is added.
      
      This obviously makes getsockopt fail for binaries that are compiled
      against an older versions of <net/sctp/user.h> which do not contain
      all event types.
      
      This patch changes getsockopt behaviour to no longer return an error
      if not enough bytes are being provided by the user. Instead, it
      returns as much of sctp_event_subscribe as fits into the provided buffer.
      
      This leads to the new behavior that users see what they have been aware
      of at compile time.
      
      The setsockopt(..., SCTP_EVENTS, ...) API is already behaving like this.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Acked-by: NVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acdd5985
  4. 09 3月, 2012 1 次提交
  5. 20 12月, 2011 1 次提交
  6. 12 12月, 2011 1 次提交
  7. 23 11月, 2011 1 次提交
  8. 01 11月, 2011 1 次提交
  9. 09 7月, 2011 1 次提交
  10. 07 7月, 2011 1 次提交
  11. 02 7月, 2011 1 次提交
  12. 17 6月, 2011 1 次提交
  13. 12 6月, 2011 1 次提交
  14. 02 6月, 2011 3 次提交
  15. 13 5月, 2011 2 次提交
  16. 28 4月, 2011 1 次提交
  17. 22 4月, 2011 1 次提交
  18. 20 4月, 2011 2 次提交
  19. 31 3月, 2011 1 次提交
  20. 08 3月, 2011 1 次提交
  21. 23 2月, 2011 1 次提交
  22. 20 1月, 2011 1 次提交
  23. 17 12月, 2010 1 次提交
  24. 11 12月, 2010 1 次提交
  25. 07 12月, 2010 1 次提交
  26. 11 11月, 2010 1 次提交
  27. 04 10月, 2010 2 次提交
  28. 24 9月, 2010 1 次提交
  29. 09 9月, 2010 1 次提交
  30. 07 9月, 2010 1 次提交
  31. 27 8月, 2010 1 次提交
  32. 16 5月, 2010 1 次提交
  33. 02 5月, 2010 1 次提交
    • E
      net: sock_def_readable() and friends RCU conversion · 43815482
      Eric Dumazet 提交于
      sk_callback_lock rwlock actually protects sk->sk_sleep pointer, so we
      need two atomic operations (and associated dirtying) per incoming
      packet.
      
      RCU conversion is pretty much needed :
      
      1) Add a new structure, called "struct socket_wq" to hold all fields
      that will need rcu_read_lock() protection (currently: a
      wait_queue_head_t and a struct fasync_struct pointer).
      
      [Future patch will add a list anchor for wakeup coalescing]
      
      2) Attach one of such structure to each "struct socket" created in
      sock_alloc_inode().
      
      3) Respect RCU grace period when freeing a "struct socket_wq"
      
      4) Change sk_sleep pointer in "struct sock" by sk_wq, pointer to "struct
      socket_wq"
      
      5) Change sk_sleep() function to use new sk->sk_wq instead of
      sk->sk_sleep
      
      6) Change sk_has_sleeper() to wq_has_sleeper() that must be used inside
      a rcu_read_lock() section.
      
      7) Change all sk_has_sleeper() callers to :
        - Use rcu_read_lock() instead of read_lock(&sk->sk_callback_lock)
        - Use wq_has_sleeper() to eventually wakeup tasks.
        - Use rcu_read_unlock() instead of read_unlock(&sk->sk_callback_lock)
      
      8) sock_wake_async() is modified to use rcu protection as well.
      
      9) Exceptions :
        macvtap, drivers/net/tun.c, af_unix use integrated "struct socket_wq"
      instead of dynamically allocated ones. They dont need rcu freeing.
      
      Some cleanups or followups are probably needed, (possible
      sk_callback_lock conversion to a spinlock for example...).
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43815482
  34. 01 5月, 2010 1 次提交
  35. 29 4月, 2010 1 次提交