OSDN Git Service

vhost/test: stop device before reset
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 7 Oct 2019 17:56:59 +0000 (13:56 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 13 Oct 2019 13:38:27 +0000 (09:38 -0400)
commit245cdd9fbd396483d501db83047116e2530f245f
tree07c9fa9e0b3ce7785c91522282fb8e0b9150139e
parentedc5774c097f6463e9fb2373832e7db726247809
vhost/test: stop device before reset

When device stop was moved out of reset, test device wasn't updated to
stop before reset, this resulted in a use after free.  Fix by invoking
stop appropriately.

Fixes: b211616d7125 ("vhost: move -net specific code out")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/test.c