commit | 122991293c1444588c0aeadb04dac4a2b923ffd9 | [log] [tgz] |
---|---|---|
author | Daniel Verkamp <dverkamp@chromium.org> | Tue Dec 20 15:04:44 2022 -0800 |
committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Dec 21 19:21:08 2022 +0000 |
tree | 704fcfbdfd533a911e3bc262036f9689c473e116 | |
parent | 8b22c63a7fb40413b3e6297bd1878b1951543aee [diff] |
devices: fs: hold inodes lock throughout add_entry() There seems to be no downside to holding self.inodes.lock() for the whole PassthroughFs::add_entry() function. We don't do any siginificant amount of work while the lock is held; either the inode already exists, in which case we increment its refcount, or the inode is added to the map. Note that we already opened the file before entering this function, so the lock is not held across open(). This also prevents the possible race between threads opening the same inode simultaneously, so remove the related comment. BUG=b:261922849 TEST=boot arcvm on brya Change-Id: I036ebaed179f7ac43d071a26cb68ba9a131521a0 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4116247 Reviewed-by: Morg <morg@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.