]> git.droids-corp.org - dpdk.git/blobdiff - lib/vhost/vhost_user.c
vhost: fix lock on device readiness notification
[dpdk.git] / lib / vhost / vhost_user.c
index 031c578e5440ceb9216fbbb1307f98f82f605a66..31300e194ffa2e4389e79e183c4612780e5c609a 100644 (file)
@@ -2995,9 +2995,6 @@ skip_to_post_handle:
                }
        }
 
-       if (unlock_required)
-               vhost_user_unlock_all_queue_pairs(dev);
-
        /* If message was not handled at this stage, treat it as an error */
        if (!handled) {
                VHOST_LOG_CONFIG(ERR,
@@ -3032,6 +3029,8 @@ skip_to_post_handle:
                }
        }
 
+       if (unlock_required)
+               vhost_user_unlock_all_queue_pairs(dev);
 
        if (!virtio_is_ready(dev))
                goto out;