mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
A UEFI timer event firing at TPL_NOTIFY can preempt SynchronousRequest while it is executing between VirtioPrepare() and VirtioFlush(). If the timer callback also performs a block I/O operation backed by the same virtio-blk device, both contexts manipulate the shared virtqueue concurrently, corrupting its state and likely crashing the firmware. Raise the TPL to TPL_NOTIFY before VirtioPrepare() and restore it after the completion poll to make the virtqueue manipulation and the status check an uninterruptible sequence. This mirrors the fix applied to the VirtioRng driver in issue #11987. On-behalf-of: SAP philipp.schuster@sap.com Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> |
||
|---|---|---|
| .. | ||
| VirtioBlk.c | ||
| VirtioBlk.h | ||
| VirtioBlk.inf | ||