No description
Find a file
Guilherme G. Piccoli c0a39ce740 coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier
[ Upstream commit 1adff542d6 ]

The panic notifier infrastructure executes registered callbacks when
a panic event happens - such callbacks are executed in atomic context,
with interrupts and preemption disabled in the running CPU and all other
CPUs disabled. That said, mutexes in such context are not a good idea.

This patch replaces a regular mutex with a mutex_trylock safer approach;
given the nature of the mutex used in the driver, it should be pretty
uncommon being unable to acquire such mutex in the panic path, hence
no functional change should be observed (and if it is, that would be
likely a deadlock with the regular mutex).

Fixes: 2227b7c746 ("coresight: add support for CPU debug module")
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20220427224924.592546-10-gpiccoli@igalia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:44:50 +02:00
arch ARM: pxa: maybe fix gpio lookup tables 2022-06-09 10:30:54 +02:00
block block: fix bio_clone_blkg_association() to associate with proper blkcg_gq 2022-06-09 10:30:57 +02:00
certs Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
crypto crypto: cryptd - Protect per-CPU resource by disabling BH. 2022-06-09 10:30:30 +02:00
Documentation media: lirc: add missing exceptions for lirc uapi header file 2022-06-09 10:30:55 +02:00
drivers coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier 2022-06-14 18:44:50 +02:00
fs fs/ntfs3: Fix invalid free in log_replay 2022-06-09 10:30:56 +02:00
include export: fix string handling of namespace in EXPORT_SYMBOL_NS 2022-06-14 18:44:49 +02:00
init Kconfig: Add option for asm goto w/ tied outputs to workaround clang-13 bug 2022-06-09 10:30:49 +02:00
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree() 2022-06-09 10:30:30 +02:00
kernel kprobes: Fix build errors with CONFIG_KRETPROBES=n 2022-06-09 10:30:51 +02:00
lib lib/string_helpers: fix not adding strarray to device's resource list 2022-06-09 10:30:49 +02:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
mm mm/memremap: fix missing call to untrack_pfn() in pagemap_range() 2022-06-09 10:30:52 +02:00
net mac80211: upgrade passive scan to active scan on DFS channels after beacon rx 2022-06-09 10:30:50 +02:00
samples samples/landlock: Format with clang-format 2022-06-09 10:30:46 +02:00
scripts scripts/get_abi: Fix wrong script file name in the help message 2022-06-14 18:44:47 +02:00
security ima: remove the IMA_TEMPLATE Kconfig option 2022-06-09 10:30:49 +02:00
sound ASoC: rt5514: Fix event generation for "DSP Voice Wake Up" control 2022-06-09 10:30:52 +02:00
tools perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems 2022-06-09 10:30:55 +02:00
usr Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
virt KVM: Free new dirty bitmap if creating a new memslot fails 2022-05-20 13:02:05 -04:00
.clang-format genirq/msi: Make interrupt allocation less convoluted 2021-12-16 22:22:20 +01:00
.cocciconfig
.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 .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap hotfixes for 5.18-rc7 2022-05-13 10:22:37 -07:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: replace a Microchip AT91 maintainer 2022-02-09 11:30:01 +01: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 Merge branch 'arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc 2022-05-18 14:07:43 -10:00
Makefile Linux 5.18.3 2022-06-09 10:30:57 +02:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

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.