Go to file
Mike Snitzer 786dc86c84 dm: interlock pending dm_io and dm_wait_for_bios_completion
commit 9f6dc633761006f974701d4c88da71ab68670749 upstream.

Commit d208b89401e0 ("dm: fix mempool NULL pointer race when
completing IO") didn't go far enough.

When bio_end_io_acct ends the count of in-flight I/Os may reach zero
and the DM device may be suspended. There is a possibility that the
suspend races with dm_stats_account_io.

Fix this by adding percpu "pending_io" counters to track outstanding
dm_io. Move kicking of suspend queue to dm_io_dec_pending(). Also,
rename md_in_flight_bios() to dm_in_flight_bios() and update it to
iterate all pending_io counters.

Fixes: d208b89401e0 ("dm: fix mempool NULL pointer race when completing IO")
Cc: stable@vger.kernel.org
Co-developed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-12 12:23:50 +02:00
arch KVM: LAPIC: Enable timer posted-interrupt only when mwait/hlt is advertised 2022-05-12 12:23:48 +02:00
block block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern 2022-05-12 12:23:48 +02:00
certs
crypto crypto: authenc - Fix sleep in atomic context in decrypt_tail 2022-04-15 14:18:04 +02:00
Documentation ext4, doc: fix incorrect h_reserved size 2022-04-27 13:50:50 +02:00
drivers dm: interlock pending dm_io and dm_wait_for_bios_completion 2022-05-12 12:23:50 +02:00
fs NFSv4: Don't invalidate inode attributes on delegation return 2022-05-12 12:23:47 +02:00
include tcp: make sure treq->af_specific is initialized 2022-05-12 12:23:50 +02:00
init init/main.c: return 1 from handled __setup() functions 2022-04-15 14:18:35 +02:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2021-12-01 09:23:35 +01:00
kernel genirq: Synchronize interrupt thread startup 2022-05-12 12:23:41 +02:00
lib hex2bin: fix access beyond string end 2022-05-09 09:03:22 +02:00
LICENSES
mm mm: fix unexpected zeroed page mapping with zram swap 2022-05-12 12:23:48 +02:00
net tcp: make sure treq->af_specific is initialized 2022-05-12 12:23:50 +02:00
samples
scripts gcc-plugins: latent_entropy: use /dev/urandom 2022-04-20 09:19:38 +02:00
security Fix incorrect type in assignment of ipv6 port for audit 2022-04-15 14:18:22 +02:00
sound ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock 2022-05-12 12:23:49 +02:00
tools selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational 2022-05-12 12:23:46 +02:00
usr
virt KVM: Prevent module exit until all VMs are freed 2022-04-15 14:18:27 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile Linux 5.4.192 2022-05-09 09:03:28 +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.