This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 0a2989ee07aa84e4e7d727baa49dd3d7ac9a5cc7 Author: Bowen Wang <[email protected]> AuthorDate: Fri Oct 23 10:02:42 2026 +0800 drivers/virtio-blk: support flush in interrupt context virtio_blk_flush() waited on its semaphore directly, so a flush issued from interrupt context or after a panic (for example by coredump) blocked forever. Wait through virtio_blk_wait_complete(), which polls the virtqueue in those contexts, as read and write already do. Signed-off-by: Bowen Wang <[email protected]> --- drivers/virtio/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio-blk.c b/drivers/virtio/virtio-blk.c index f0b1c589fd2..52243531107 100644 --- a/drivers/virtio/virtio-blk.c +++ b/drivers/virtio/virtio-blk.c @@ -370,7 +370,7 @@ static int virtio_blk_flush(FAR struct virtio_blk_priv_s *priv) /* Wait for the request completion */ - nxsem_wait_uninterruptible(&respsem); + virtio_blk_wait_complete(vq, &respsem); if (resp.status != VIRTIO_BLK_S_OK) { vrterr("Flush Error\n");
