In the Linux kernel, the following vulnerability has been resolved: xen-blkfront: Fix IO race during unplug During unplug, blkfront stops the hw queues and marks the disk as dead, then later during removal calls del_gendisk(). However, IO issued after the hw queues are stopped but before the call to del_gendisk() will be queued but never handled. This causes del_gendisk() to hang forever waiting for the queue refcount to drop to zero. This can be reproduced by issuing IO during an artificial delay after stopping the hw queues. Fix this by simply not stopping the hw queues directly. Marking the disk as dead already freezes the queue which prevents new requests being added and it synchronously runs the hw queues to clear anything pending. If the hw queues are stopped when calling blk_mark_disk_dead(), running the hw queues is a no-op and can leave queued requests unprocessed.
https://git.kernel.org/stable/c/b83510f2053446bc291ded824b8042e42c1febf8
https://git.kernel.org/stable/c/8815f5221e993d16674bae18e4d7363f0c036adf
https://git.kernel.org/stable/c/61b6d1df1d6234c38a6ea7e4f58e7da035ef6ab4
https://git.kernel.org/stable/c/5522da98153e39a9ddd0a59a41604a14114b63b4
https://git.kernel.org/stable/c/499be56511b46ad154051e202a5e9731a35a0ac0
https://git.kernel.org/stable/c/24f7f97d3051299bc58f5366182662a7e31a5a24
https://git.kernel.org/stable/c/07fc8d43742a0e5a6f114c39999112ea165bfa51