diff options
author | John Levon <john.levon@nutanix.com> | 2023-01-03 12:23:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-03 12:23:43 +0000 |
commit | 3eb7ff6579740a5b962c1a52804b0ec5b29a4c42 (patch) | |
tree | f7a519153645a4560eae19e3e9843adafef3cd9c /lib/private.h | |
parent | ad96efb02c27ec22116fb5800b48a6c9df27958f (diff) | |
download | libvfio-user-3eb7ff6579740a5b962c1a52804b0ec5b29a4c42.zip libvfio-user-3eb7ff6579740a5b962c1a52804b0ec5b29a4c42.tar.gz libvfio-user-3eb7ff6579740a5b962c1a52804b0ec5b29a4c42.tar.bz2 |
fix FLR reset callback (#729)
A reset callback is allowed to call functions disallowed in quiescent
state. However, the FLR reset path neglected to account for this
properly, causing an incorrect assert to be triggered if, for example,
vfu_sgl_put() is called. To fix this, make sure all reset paths go
through call_reset_cb().
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/private.h')
-rw-r--r-- | lib/private.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private.h b/lib/private.h index 346cfed..fdd804f 100644 --- a/lib/private.h +++ b/lib/private.h @@ -221,10 +221,10 @@ handle_dma_unmap(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg, struct vfio_user_dma_unmap *dma_unmap); int -handle_device_get_region_info(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); +call_reset_cb(vfu_ctx_t *vfu_ctx, vfu_reset_type_t reason); int -handle_device_reset(vfu_ctx_t *vfu_ctx, vfu_reset_type_t reason); +handle_device_get_region_info(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg); MOCK_DECLARE(bool, cmd_allowed_when_stopped_and_copying, uint16_t cmd); |