Go to file
Gerald Schaefer 65b6b10fc0 s390/mm: Remove possible false-positive warning in pte_free_defer()
commit 5647f61ad9 upstream.

Commit 8211dad627 ("s390: add pte_free_defer() for pgtables sharing
page") added a warning to pte_free_defer(), on our request. It was meant
to warn if this would ever be reached for KVM guest mappings, because
the page table would be freed w/o a gmap_unlink(). THP mappings are not
allowed for KVM guests on s390, so this should never happen.

However, it is possible that the warning is triggered in a valid case as
false-positive.

s390_enable_sie() takes the mmap_lock, marks all VMAs as VM_NOHUGEPAGE and
splits possibly existing THP guest mappings. mm->context.has_pgste is set
to 1 before that, to prevent races with the mm_has_pgste() check in
MADV_HUGEPAGE.

khugepaged drops the mmap_lock for file mappings and might run in parallel,
before a vma is marked VM_NOHUGEPAGE, but after mm->context.has_pgste was
set to 1. If it finds file mappings to collapse, it will eventually call
pte_free_defer(). This will trigger the warning, but it is a valid case
because gmap is not yet set up, and the THP mappings will be split again.

Therefore, remove the warning and the comment.

Fixes: 8211dad627 ("s390: add pte_free_defer() for pgtables sharing page")
Cc: <stable@vger.kernel.org> # 6.6+
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:28:41 +02:00
arch s390/mm: Remove possible false-positive warning in pte_free_defer() 2025-08-28 16:28:41 +02:00
block block: reject invalid operation in submit_bio_noacct 2025-08-28 16:28:40 +02:00
certs
crypto crypto: jitter - fix intermediary handling 2025-08-28 16:28:26 +02:00
Documentation fscrypt: Don't use problematic non-inline crypto engines 2025-08-28 16:28:40 +02:00
drivers usb: typec: fusb302: cache PD RX state 2025-08-28 16:28:40 +02:00
fs btrfs: send: make fs_path_len() inline and constify its argument 2025-08-28 16:28:41 +02:00
include btrfs: constify more pointer parameters 2025-08-28 16:28:41 +02:00
init
io_uring io_uring/net: commit partial buffers on retry 2025-08-28 16:28:11 +02:00
ipc
kernel mm: drop the assumption that VM_SHARED always implies writable 2025-08-28 16:28:39 +02:00
lib
LICENSES
mm mm: reinstate ability to map write-sealed memfd mappings read-only 2025-08-28 16:28:39 +02:00
net net/sched: ets: use old 'nbands' while purging unused classes 2025-08-28 16:28:40 +02:00
rust
samples
scripts kconfig: lxdialog: fix 'space' to (de)select options 2025-08-28 16:28:29 +02:00
security apparmor: use the condition in AA_BUG_FMT even with debug disabled 2025-08-28 16:28:28 +02:00
sound ASoC: fsl_sai: replace regmap_write with regmap_update_bits 2025-08-28 16:28:30 +02:00
tools selftests/memfd: add test for mapping write-sealed memfd read-only 2025-08-28 16:28:39 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 6.6.102 2025-08-15 12:09:09 +02: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.