On Mon, Mar 4, 2024 at 11:36 AM David Marchand <david.march...@redhat.com> wrote: > > From: Maxime Coquelin <maxime.coque...@redhat.com> > > VDUSE_DESTROY_DEVICE ioctl can fail because the device's > chardev is not released despite close syscall having been > called. It happens because the events handler thread is > still polling the file descriptor. > > fdset_pipe_notify() is not enough because it does not > ensure the notification has been handled by the event > thread, it just returns once the notification is sent. > > To fix this, this patch introduces a synchronization > mechanism based on pthread's condition, so that > fdset_pipe_notify_sync() only returns once the pipe's > read callback has been executed. > > Fixes: 51d018fdac4e ("vhost: add VDUSE events handler") > Cc: sta...@dpdk.org > > Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com> > Signed-off-by: David Marchand <david.march...@redhat.com> > --- > Changes since v1: > - sync'd only when in VDUSE destruction path, > - added explicit init of sync_mutex,
Applied, thanks. -- David Marchand