The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Logan Gunthorpe 20313b1b8c md/raid5: Ensure batch_last is released before sleeping for quiesce
A race condition exists where if raid5_quiesce() is called in the
middle of a request that has set batch_last, it will deadlock.

batch_last will hold a reference to a stripe when raid5_quiesce() is
called. This will cause the next raid5_get_active_stripe() call to
sleep waiting for the quiesce to finish, but the raid5_quiesce() thread
will wait for active_stripes to go to zero which will never happen
because request thread is waiting for the quiesce to stop.

Fix this by creating a special __raid5_get_active_stripe() function
which takes the request context and clears the last_batch before
sleeping.

While we're at it, change the arguments of raid5_get_active_stripe()
to bools.

Fixes: 3312e6c887 ("md/raid5: Keep a reference to last stripe_head for batch")
Reported-by: David Sloan <David.Sloan@eideticom.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-08-02 21:08:53 -06:00
Documentation null_blk: add module parameters for 4 options 2022-08-02 17:14:50 -06:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
arch for-5.20/block-2022-07-29 2022-08-02 13:46:35 -07:00
block block: pass struct queue_limits to the bio splitting helpers 2022-08-02 21:08:53 -06:00
certs certs: make system keyring depend on x509 parser 2022-07-24 12:53:55 -07:00
crypto crypto: add crypto_has_kpp() 2022-08-02 17:14:47 -06:00
drivers md/raid5: Ensure batch_last is released before sleeping for quiesce 2022-08-02 21:08:53 -06:00
fs for-5.20/block-2022-07-29 2022-08-02 13:46:35 -07:00
include block: move ->bio_split to the gendisk 2022-08-02 21:08:49 -06:00
init gcc-12: disable '-Warray-bounds' universally for now 2022-06-09 10:11:12 -07:00
io_uring for-5.20/io_uring-zerocopy-send-2022-07-29 2022-08-02 13:37:55 -07:00
ipc ipc: Free mq_sysctls if ipc namespace creation failed 2022-06-22 17:47:41 -05:00
kernel for-5.20/block-2022-07-29 2022-08-02 13:46:35 -07:00
lib lib/base64: RFC4648-compliant base64 encoding 2022-08-02 17:14:47 -06:00
mm for-5.20/io_uring-buffered-writes-2022-07-29 2022-08-02 13:27:23 -07:00
net for-5.20/io_uring-zerocopy-send-2022-07-29 2022-08-02 13:37:55 -07:00
samples Fixes and minor clean ups for tracing: 2022-07-12 16:17:40 -07:00
scripts - Fix stack protector builds when cross compiling with Clang 2022-08-01 10:14:19 -07:00
security - Add the ability to pass early an RNG seed to the kernel from the boot 2022-08-01 10:17:19 -07:00
sound ASoC: Drop Rockchip BCLK management for v5.19 2022-07-15 12:31:07 +02:00
tools for-5.20/io_uring-zerocopy-send-2022-07-29 2022-08-02 13:37:55 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt KVM: x86: disable preemption around the call to kvm_arch_vcpu_{un|}blocking 2022-06-09 10:52:20 -04:00
.clang-format clang-format: Fix space after for_each macros 2022-05-20 19:27:16 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.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 kbuild: split the second line of *.mod into *.usyms 2022-05-08 03:16:59 +09:00
.mailmap ARM: SoC fixes for 5.19, part 4 2022-07-27 09:43:07 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: mark ARM/PALM TREO SUPPORT orphan 2022-07-07 15:17:00 +02: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 nvme: update MAINTAINERS for the new auth code 2022-08-02 17:22:53 -06:00
Makefile for-5.20/io_uring-2022-07-29 2022-08-02 13:20:44 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06: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.