• Duncan Sands's avatar
    [PATCH] USB: turn speedtouch micro race into a nano race · c0cebfa4
    Duncan Sands authored
      speedtouch: turn a micro race into a nano race.  The race is that an ATM device can
      be used the moment atm_dev_register returns, but you only get to fill out the
      atm_dev structure after atm_dev_register returns (this is a design flaw in the
      ATM layer).  Thus there is a small window during which you can be called with an
      incompletely set up data structure.  Workaround this by causing all ATM callbacks
      to fail if the dev_data field has not been set.  There is still a nano race if
      writing/reading the dev_data field is not atomic.  Is it atomic on all architectures?
    c0cebfa4
speedtouch.c 24.7 KB