No description
Find a file
Joel Fernandes (Google) 78efab71a6 torture: Fix hang during kthread shutdown phase
commit d52d3a2bf4 upstream.

During rcutorture shutdown, the rcu_torture_cleanup() function calls
torture_cleanup_begin(), which sets the fullstop global variable to
FULLSTOP_RMMOD. This causes the rcutorture threads for readers and
fakewriters to exit all of their "while" loops and start shutting down.

They then call torture_kthread_stopping(), which in turn waits for
kthread_stop() to be called.  However, rcu_torture_cleanup() has
not yet called kthread_stop() on those threads, and before it gets a
chance to do so, multiple instances of torture_kthread_stopping() invoke
schedule_timeout_interruptible(1) in a tight loop.  Tracing confirms that
TIMER_SOFTIRQ can then continuously execute timer callbacks.  If that
TIMER_SOFTIRQ preempts the task executing rcu_torture_cleanup(), that
task might never invoke kthread_stop().

This commit improves this situation by increasing the timeout passed to
schedule_timeout_interruptible() from one jiffy to 1/20th of a second.
This change prevents TIMER_SOFTIRQ from monopolizing its CPU, thus
allowing rcu_torture_cleanup() to carry out the needed kthread_stop()
invocations.  Testing has shown 100 runs of TREE07 passing reliably,
as oppose to the tens-of-percent failure rates seen beforehand.

Cc: Paul McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Zhouyi Zhou <zhouzhouyi@gmail.com>
Cc: <stable@vger.kernel.org> # 6.0.x
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Tested-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:18:19 +02:00
arch x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4 2023-08-30 16:18:19 +02:00
block block/partition: fix signedness issue for Amiga partitions 2023-07-23 13:47:37 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:22:01 +02:00
crypto KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() 2023-06-09 10:32:34 +02:00
Documentation x86/cpu: Rename srso_(.*)_alias to srso_alias_\1 2023-08-26 14:23:39 +02:00
drivers drm/vmwgfx: Fix shader stage validation 2023-08-30 16:18:19 +02:00
fs nfsd: use vfs setgid helper 2023-08-30 16:18:19 +02:00
include nfs: use vfs setgid helper 2023-08-30 16:18:19 +02:00
init x86/mm: Initialize text poking earlier 2023-08-08 19:58:33 +02:00
io_uring io_uring: correct check for O_TMPFILE 2023-08-16 18:21:59 +02:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel torture: Fix hang during kthread shutdown phase 2023-08-30 16:18:19 +02:00
lib radix tree: remove unused variable 2023-08-30 16:18:18 +02:00
LICENSES
mm mm: add a call to flush_cache_vmap() in vmap_pfn() 2023-08-30 16:18:16 +02:00
net batman-adv: Hold rtnl lock during MTU update via netlink 2023-08-30 16:18:18 +02:00
samples samples: ftrace: Save required argument registers in sample trampolines 2023-07-23 13:47:55 +02:00
scripts kbuild: Disable GCOV for *.mod.o 2023-07-23 13:47:17 +02:00
security selinux: set next pointer before attaching to list 2023-08-30 16:18:17 +02:00
sound ALSA: ymfpci: Fix the missing snd_card_free() call at probe error 2023-08-30 16:18:16 +02:00
tools objtool/x86: Fix SRSO mess 2023-08-30 16:18:10 +02:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:27:15 +01:00
virt KVM: Grab a reference to KVM for VM and vCPU stats file descriptors 2023-08-03 10:22:40 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS iio: stx104: Move to addac subdirectory 2023-08-26 14:23:27 +02:00
Makefile Linux 5.15.128 2023-08-26 14:23:41 +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.