No description
Find a file
Krzysztof Wilczyński 93bb8e352a sysfs: Invoke iomem_get_mapping() from the sysfs open callback
Defer invocation of the iomem_get_mapping() to the sysfs open callback
so that it can be executed as needed when the binary sysfs object has
been accessed.

To do that, convert the "mapping" member of the struct bin_attribute
from a pointer to the struct address_space into a function pointer with
a signature that requires the same return type, and then updates the
sysfs_kf_bin_open() to invoke provided function should the function
pointer be valid.

Also, convert every invocation of iomem_get_mapping() into a function
pointer assignment, therefore allowing for the iomem_get_mapping()
invocation to be deferred to when the sysfs open callback runs.

Thus, this change removes the need for the fs_initcalls to complete
before any other sub-system that uses the iomem_get_mapping() would be
able to invoke it safely without leading to a failure and an Oops
related to an invalid iomem_get_mapping() access.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Link: https://lore.kernel.org/r/20210729233235.1508920-2-kw@linux.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-05 14:47:31 +02:00
arch powerpc fixes for 5.14 #3 2021-07-25 10:33:48 -07:00
block
certs
crypto
Documentation userfaultfd: do not untag user pointers 2021-07-23 17:43:28 -07:00
drivers sysfs: Invoke iomem_get_mapping() from the sysfs open callback 2021-08-05 14:47:31 +02:00
fs sysfs: Invoke iomem_get_mapping() from the sysfs open callback 2021-08-05 14:47:31 +02:00
include sysfs: Invoke iomem_get_mapping() from the sysfs open callback 2021-08-05 14:47:31 +02:00
init Revert "mm/slub: use stackdepot to save stack trace in objects" 2021-07-17 13:27:00 -07:00
ipc
kernel smpboot: fix duplicate and misplaced inlining directive 2021-07-25 11:06:37 -07:00
lib
LICENSES
mm mm: fix the deadlock in finish_fault() 2021-07-23 17:43:28 -07:00
net net: sched: cls_api: Fix the the wrong parameter 2021-07-22 00:48:03 -07:00
samples
scripts Kbuild fixes for v5.14 2021-07-18 11:10:30 -07:00
security
sound sound fixes for 5.14-rc3 2021-07-23 09:58:23 -07:00
tools selftest: use mmap instead of posix_memalign to allocate memory 2021-07-23 17:43:28 -07:00
usr
virt * Allow again loading KVM on 32-bit non-PAE builds 2021-07-15 11:56:07 -07:00
.clang-format
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS MAINTAINERS: move Murali Karicheri to credits 2021-04-29 15:47:30 -07:00
Kbuild
Kconfig
MAINTAINERS Char/Misc fixes for 5.14-rc3 2021-07-23 10:14:56 -07:00
Makefile Linux 5.14-rc3 2021-07-25 15:35:14 -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.