virtiofsd: make lo_release() atomic
authorStefan Hajnoczi <stefanha@redhat.com>
Fri, 26 Jul 2019 09:11:01 +0000 (10:11 +0100)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (16:41 +0000)
commitbaed65c060c0e524530bc243eec427fb408bd477
treecc65ef677c93bfad7dcfb8ee68d9689733ee6dd8
parente7b337326d594b71b07cd6dbb332c49c122c80a4
virtiofsd: make lo_release() atomic

Hold the lock across both lo_map_get() and lo_map_remove() to prevent
races between two FUSE_RELEASE requests.  In this case I don't see a
serious bug but it's safer to do things atomically.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/passthrough_ll.c