No description
Find a file
Jason Gunthorpe eadd86f835 vfio: Remove calls to vfio_group_add_container_user()
When the open_device() op is called the container_users is incremented and
held incremented until close_device(). Thus, so long as drivers call
functions within their open_device()/close_device() region they do not
need to worry about the container_users.

These functions can all only be called between open_device() and
close_device():

  vfio_pin_pages()
  vfio_unpin_pages()
  vfio_dma_rw()
  vfio_register_notifier()
  vfio_unregister_notifier()

Eliminate the calls to vfio_group_add_container_user() and add
vfio_assert_device_open() to detect driver mis-use. This causes the
close_device() op to check device->open_count so always leave it elevated
while calling the op.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/7-v4-8045e76bf00b+13d-vfio_mdev_no_group_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2022-05-11 13:13:00 -06:00
arch parisc architecture fixes for kernel v5.18-rc6 2022-05-08 12:42:05 -07:00
block Revert "block: release rq qos structures for queue without disk" 2022-05-02 10:06:40 -06:00
certs Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
crypto for-5.18/64bit-pi-2022-03-25 2022-03-26 12:01:35 -07:00
Documentation vfio/mdev: Pass in a struct vfio_device * to vfio_pin/unpin_pages() 2022-05-11 13:12:59 -06:00
drivers vfio: Remove calls to vfio_group_add_container_user() 2022-05-11 13:13:00 -06:00
fs io_uring-5.18-2022-05-06 2022-05-07 10:41:41 -07:00
include vfio: Remove dead code 2022-05-11 13:13:00 -06:00
init Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
ipc fs: allocate inode by using alloc_inode_sb() 2022-03-22 15:57:03 -07:00
kernel A fix and an email address update: 2022-05-08 11:18:11 -07:00
lib - A fix to disable PCI/MSI[-X] masking for XEN_HVM guests as that is 2022-05-01 10:03:36 -07:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
mm mm/readahead: Fix readahead with large folios 2022-05-05 00:47:29 -04:00
net NFS client bugfixes for Linux 5.18 2022-05-06 13:19:11 -07:00
samples vfio/mdev: Remove mdev_parent_ops 2022-04-21 07:36:56 -04:00
scripts objtool: Enable unreachable warnings for CLANG LTO 2022-04-19 21:58:48 +02:00
security hardening updates for v5.18-rc1-fix1 2022-03-31 11:43:01 -07:00
sound ASoC: Fixes for v5.18 2022-05-08 10:49:25 +02:00
tools Networking fixes for 5.18-rc6, including fixes from can, rxrpc and 2022-05-05 09:45:12 -07:00
usr Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
virt Merge branch 'kvm-fixes-for-5.18-rc5' into HEAD 2022-04-29 12:39:34 -04:00
.clang-format genirq/msi: Make interrupt allocation less convoluted 2021-12-16 22:22:20 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap futex: MAINTAINERS, .mailmap: Update André's email address 2022-04-22 10:30:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: replace a Microchip AT91 maintainer 2022-02-09 11:30:01 +01:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS A fix and an email address update: 2022-05-08 11:21:54 -07:00
Makefile Linux 5.18-rc6 2022-05-08 13:54:17 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.