summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2020-05-29 11:02:59 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-06-04 22:36:51 +0300
commit5ce995f313ce56c0c62425c3ddc37c5c50fc33db (patch)
tree45625f17916f0f8c9ae5cdd2b1acbd8404bb90aa /include/linux
parent01fcb1cbc88effb3493c6197efc96b69b9f4823a (diff)
downloadlinux-5ce995f313ce56c0c62425c3ddc37c5c50fc33db.tar.xz
vhost: use mmgrab() instead of mmget() for non worker device
For the device that doesn't use vhost worker and use_mm(), mmget() is too heavy weight and it may brings troubles for implementing mmap() support for vDPA device. This is because, an reference to the address space was held via mm_get() in vhost_dev_set_owner() and an reference to the file was held in mmap(). This means when process exits, the mm can not be released thus we can not release the file. This patch tries to use mmgrab() instead of mmget(), which allows the address space to be destroy in process exit without releasing the mm structure itself. This is sufficient for vDPA device which pin user pages and does not depend on the address space to work. Signed-off-by: Jason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20200529080303.15449-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions