Find a file
Andreas Gruenbacher d98779e687 gfs2: Fix potential glock use-after-free on unmount
When a DLM lockspace is released and there ares still locks in that
lockspace, DLM will unlock those locks automatically.  Commit
fb6791d100 started exploiting this behavior to speed up filesystem
unmount: gfs2 would simply free glocks it didn't want to unlock and then
release the lockspace.  This didn't take the bast callbacks for
asynchronous lock contention notifications into account, which remain
active until until a lock is unlocked or its lockspace is released.

To prevent those callbacks from accessing deallocated objects, put the
glocks that should not be unlocked on the sd_dead_glocks list, release
the lockspace, and only then free those glocks.

As an additional measure, ignore unexpected ast and bast callbacks if
the receiving glock is dead.

Fixes: fb6791d100 ("GFS2: skip dlm_unlock calls in unmount")
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Cc: David Teigland <teigland@redhat.com>
2024-04-24 19:48:20 +02:00
arch KVM GUEST_MEMFD fixes for 6.8: 2024-03-10 09:27:39 -07:00
block
certs
crypto
Documentation KVM GUEST_MEMFD fixes for 6.8: 2024-03-10 09:27:39 -07:00
drivers phy third set of fixes for 6.8 2024-03-10 11:39:48 -07:00
fs gfs2: Fix potential glock use-after-free on unmount 2024-04-24 19:48:20 +02:00
include Tracing fixes for v6.8-rc7: 2024-03-10 11:53:21 -07:00
init
io_uring
ipc
kernel Tracing fixes for v6.8-rc7: 2024-03-10 11:53:21 -07:00
lib
LICENSES
mm 6 hotfixes. 4 are cc:stable and the remainder pertain to post-6.7 2024-03-07 17:16:38 -08:00
net A follow-up for sparse read fixes that went into -rc4 -- msgr2 case was 2024-03-08 18:05:21 -08:00
rust
samples
scripts 6 hotfixes. 4 are cc:stable and the remainder pertain to post-6.7 2024-03-07 17:16:38 -08:00
security
sound ASoC: Fixes for v6.8 2024-03-08 08:53:36 +01:00
tools KVM GUEST_MEMFD fixes for 6.8: 2024-03-10 09:27:39 -07:00
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap drm fixes for 6.8 final 2024-03-08 12:44:56 -08:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS drm fixes for 6.8 final 2024-03-08 12:44:56 -08:00
Makefile Linux 6.8 2024-03-10 13:38:09 -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.