Re: [Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-04 Thread David Gibson
On Wed, Dec 02, 2015 at 05:36:49AM -0500, Marc-André Lureau wrote: > Hi > > - Original Message - > > ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up > > the handling of the test server in vhost-user-test. Unfortunately it > > introduced a subtle use-after-free if a

Re: [Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-02 Thread Marc-André Lureau
Hi - Original Message - > ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up > the handling of the test server in vhost-user-test. Unfortunately it > introduced a subtle use-after-free if a race goes the wrong way. > > When the server structure is freed inside test_se

[Qemu-devel] [PATCH] tests/vhost-user-test: Fix potential use-after-free

2015-12-01 Thread David Gibson
ae31fb5 "vhost-user-test: wrap server in TestServer struct" cleaned up the handling of the test server in vhost-user-test. Unfortunately it introduced a subtle use-after-free if a race goes the wrong way. When the server structure is freed inside test_server_free() the GThread started earlier is