No description
Find a file
Jann Horn 2ad10bcc9d mm/khugepaged: fix GUP-fast interaction by sending IPI
commit 2ba99c5e08 upstream.

Since commit 70cbc3cc78 ("mm: gup: fix the fast GUP race against THP
collapse"), the lockless_pages_from_mm() fastpath rechecks the pmd_t to
ensure that the page table was not removed by khugepaged in between.

However, lockless_pages_from_mm() still requires that the page table is
not concurrently freed.  Fix it by sending IPIs (if the architecture uses
semi-RCU-style page table freeing) before freeing/reusing page tables.

Link: https://lkml.kernel.org/r/20221129154730.2274278-2-jannh@google.com
Link: https://lkml.kernel.org/r/20221128180252.1684965-2-jannh@google.com
Link: https://lkml.kernel.org/r/20221125213714.4115729-2-jannh@google.com
Fixes: ba76149f47 ("thp: khugepaged")
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[manual backport: two of the three places in khugepaged that can free
ptes were refactored into a common helper between 5.15 and 6.0]
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-19 17:56:57 +08:00
arch ARM: dts: rockchip: disable arm_global_timer on rk3066 and rk3188 2023-04-19 17:56:56 +08:00
block block, bfq: fix null pointer dereference in bfq_bio_bfqg() 2023-04-19 17:56:33 +08:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2023-04-19 17:50:34 +08:00
crypto crypto: akcipher - default implementation for setting a private key 2023-04-19 17:55:27 +08:00
Documentation docs: update mediator contact information in CoC doc 2023-04-19 17:56:27 +08:00
drivers net: usb: qmi_wwan: add u-blox 0x1342 composition 2023-04-19 17:56:57 +08:00
fs btrfs: send: avoid unaligned encoded writes when attempting to clone range 2023-04-19 17:56:56 +08:00
include mm/khugepaged: fix GUP-fast interaction by sending IPI 2023-04-19 17:56:57 +08:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2023-04-19 17:56:40 +08:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2023-04-19 17:56:54 +08:00
kernel proc: proc_skip_spaces() shouldn't think it is working on C strings 2023-04-19 17:56:54 +08:00
lib Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled 2023-04-19 17:56:53 +08:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm mm/khugepaged: fix GUP-fast interaction by sending IPI 2023-04-19 17:56:57 +08:00
net 9p/xen: check logical size for buffer size 2023-04-19 17:56:56 +08:00
samples samples/landlock: Format with clang-format 2023-04-19 17:50:01 +08:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2023-04-19 17:56:46 +08:00
security capabilities: fix potential memleak on error path from vfs_getxattr_alloc() 2023-04-19 17:56:03 +08:00
sound ASoC: soc-pcm: Add NULL check in BE reparenting 2023-04-19 17:56:56 +08:00
tools selftests/net: Find nettest in current directory 2023-04-19 17:56:56 +08:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2023-04-19 17:44:58 +08:00
virt kvm: Add support for arch compat vm ioctls 2023-04-19 17:55:40 +08:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.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 mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03: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 Input: goodix - add a goodix.h header file 2023-04-19 17:50:59 +08:00
Makefile Linux 5.15.82 2023-04-19 17:56:54 +08: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.