Go to file
Ryo Takakura ed30141557 lockdep: Fix wait context check on softirq for PREEMPT_RT
[ Upstream commit 61c39d8c83 ]

Since:

  0c1d7a2c2d ("lockdep: Remove softirq accounting on PREEMPT_RT.")

the wait context test for mutex usage within "in softirq context" fails
as it references @softirq_context:

    | wait context tests |
    --------------------------------------------------------------------------
                                   | rcu  | raw  | spin |mutex |
    --------------------------------------------------------------------------
                 in hardirq context:  ok  |  ok  |  ok  |  ok  |
  in hardirq context (not threaded):  ok  |  ok  |  ok  |  ok  |
                 in softirq context:  ok  |  ok  |  ok  |FAILED|

As a fix, add lockdep map for BH disabled section. This fixes the
issue by letting us catch cases when local_bh_disable() gets called
with preemption disabled where local_lock doesn't get acquired.
In the case of "in softirq context" selftest, local_bh_disable() was
being called with preemption disable as it's early in the boot.

[ boqun: Move the lockdep annotations into __local_bh_*() to avoid false
         positives because of unpaired local_bh_disable() reported by
	 Borislav Petkov and Peter Zijlstra, and make bh_lock_map
	 only exist for PREEMPT_RT. ]

[ mingo: Restored authorship and improved the bh_lock_map definition. ]

Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250321143322.79651-1-boqun.feng@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:37:55 +02:00
arch x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc() 2025-05-22 14:08:28 +02:00
block block: fix direct io NOWAIT flag not work 2025-05-22 14:08:26 +02:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:22:01 +02:00
crypto crypto: null - Use spin lock instead of mutex 2025-05-02 07:44:34 +02:00
Documentation x86/its: Add "vmexit" option to skip mitigation on some CPUs 2025-05-22 14:08:24 +02:00
drivers thermal/drivers/qoriq: Power down TMU on system suspend 2025-06-04 14:37:55 +02:00
fs NFSv4: Treat ENETUNREACH errors as fatal for state recovery 2025-06-04 14:37:55 +02:00
include tracing: Mark binary printing functions with __printf() attribute 2025-06-04 14:37:54 +02:00
init sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP 2025-05-02 07:44:36 +02:00
io_uring io_uring: fix possible deadlock in io_register_iowq_max_workers() 2024-11-17 15:06:25 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:28:45 +01:00
kernel lockdep: Fix wait context check on softirq for PREEMPT_RT 2025-06-04 14:37:55 +02:00
lib dql: Fix dql->limit value when reset. 2025-06-04 14:37:55 +02:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm mm: fix apply_to_existing_page_range() 2025-05-02 07:44:24 +02:00
net SUNRPC: rpcbind should never reset the port to the value '0' 2025-06-04 14:37:55 +02:00
samples samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora 2025-06-04 14:37:54 +02:00
scripts kconfig: merge_config: use an empty file as initfile 2025-06-04 14:37:54 +02:00
security landlock: Add the errata interface 2025-05-02 07:44:20 +02:00
sound ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera 2025-05-22 14:08:25 +02:00
tools selftests/mm: compaction_test: support platform with huge mount of memory 2025-05-22 14:08:27 +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: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-10-22 15:40:41 +02:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore Remove *.orig pattern from .gitignore 2024-10-17 15:11:10 +02:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03: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 trace: Relocate event helper files 2024-04-10 16:19:24 +02:00
Makefile Linux 5.15.184 2025-05-22 14:08: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.