]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: Limit group opens
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 25 Jun 2013 22:06:54 +0000 (16:06 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 25 Jun 2013 22:06:54 +0000 (16:06 -0600)
commit4716bf82622f1512072b835fc65c0130fd42fae3
tree504f88a65c5ad214086ae2e3edff7bd4efcb548f
parent88c95046bd15f16fa3bfefba7587d8f4b8c7db78
vfio: Limit group opens

vfio_group_fops_open attempts to limit concurrent sessions by
disallowing opens once group->container is set.  This really doesn't
do what we want and allow for inconsistent behavior, for instance a
group can be opened twice, then a container set giving the user two
file descriptors to the group.  But then it won't allow more to be
opened.  There's not much reason to have the group opened multiple
times since most access is through devices or the container, so
complete what the original code intended and only allow a single
instance.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c