On 05/24/2011 03:05 PM, Kevin Wolf wrote:
Maybe the callback should be done from a BH then? It sounds like this could cause more bugs than what you're fixing here.
Not sure, after all it makes sense to answer some queries synchronously (e.g. TEST_UNIT_READY). It's just the convoluted control flow that tricked you when you moved accesses to after the request has been completed. With reference counting, the data in the SCSIRequest remains completely valid after it has been completed and until the last ref goes away, so I see no reason to complicate the logic further by introducing a BH.
Paolo