[PATCH] USB: turn speedtouch micro race into a nano race
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?
Showing
Please register or sign in to comment