To better approach this issue I suggest to do the following: 1. Revert the original patch. 2. Stop waiting to long for writes. E.g. use a separate timeout (20ms maybe?) to wait for the write. Then do a WARN_ON_ONCE when we timeout. Cannot do that 20ms is not enough, sometimes you need 10 seconds since other VFs may doing bad things like occupying GPU intentionally or they are doing TDR, so I don't think separate read and write is good idea, they should be treated equally 3. To the read function add a "if (!in_intterupt()) may_sleep();" and then retest. That should at least print a nice warning when called from atomic context. Sorry what is may_sleep() ?? 4. Test the whole thing and try to fix all warnings about atomic contexts from the may_sleep(); 5. Reapply the original patch, but this time only for the read function, not the write function.