-
Kevin Peng authored
In the blk driver, the process goes to sleep while waiting for the blk driver to finish. However, it is possible for the kernel to attempt to wake up the process before it actually goes to sleep, leading the the process getting stuck in the sleep state. When there are multiple processors running, this bug regularly manifests here while(owned_buf->disk == 1) { sleep((void *)owned_buf, &blk_lock); } To fix this, the kernel will now acquire the blk_lock when handling a blk interrupt.