1. 04 Jun, 2007 3 commits
    • David S. Miller's avatar
      [AF_UNIX]: Fix datagram connect race causing an OOPS. · 278a3de5
      David S. Miller authored
      Based upon an excellent bug report and initial patch by
      Frederik Deweerdt.
      
      The UNIX datagram connect code blindly dereferences other->sk_socket
      via the call down to the security_unix_may_send() function.
      
      Without locking 'other' that pointer can go NULL via unix_release_sock()
      which does sock_orphan() which also marks the socket SOCK_DEAD.
      
      So we have to lock both 'sk' and 'other' yet avoid all kinds of
      potential deadlocks (connect to self is OK for datagram sockets and it
      is possible for two datagram sockets to perform a simultaneous connect
      to each other).  So what we do is have a "double lock" function similar
      to how we handle this situation in other areas of the kernel.  We take
      the lock of the socket pointer with the smallest address first in
      order to avoid ABBA style deadlocks.
      
      Once we have them both locked, we check to see if SOCK_DEAD is set
      for 'other' and if so, drop everything and retry the lookup.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      278a3de5
    • Michael Chan's avatar
      [TG3]: Fix link problem on Dell's onboard 5906. · 007a880d
      Michael Chan authored
      The bug is caused by code that always set
      (TG3_FLAG_USE_MI_INTERRUPT | TG3_FLAG_USE_LINKCHG_REG) on all Dell's
      onboard devices.  With these 2 flags set, the link status is polled
      by tg3_timer() and will only work when the PHY is set up to interrupt
      the MAC on link changes.  This breaks 5906 because the 5906 PHY does
      not support TG3_FLAG_USE_MI_INTERRUPT the same as other PHYs.
      
      For correctness, only Dell's onboard 5701 needs these 2 flags to be
      set.  This change will fix the 5906 problem and will change other
      Dell devices except 5700 and 5701 to use the more efficient
      interrupt-driven link changes.
      
      Update version to 3.77.
      Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      007a880d
    • David S. Miller's avatar
      [AF_UNIX]: Make socket locking much less confusing. · 1c92b4e5
      David S. Miller authored
      The unix_state_*() locking macros imply that there is some
      rwlock kind of thing going on, but the implementation is
      actually a spinlock which makes the code more confusing than
      it needs to be.
      
      So use plain unix_state_lock and unix_state_unlock.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c92b4e5
  2. 03 Jun, 2007 15 commits
  3. 02 Jun, 2007 18 commits
  4. 01 Jun, 2007 4 commits