Go to file
Jerome Marchand f5ebcab25b tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher()
JIRA: https://issues.redhat.com/browse/RHEL-101938

commit cc72b72073ac982a954d3b43519ca1c28f03c27c
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Date:   Sat May 28 00:55:39 2022 +0900

    tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher()

    There is a small chance that get_kretprobe(ri) returns NULL in
    kretprobe_dispatcher() when another CPU unregisters the kretprobe
    right after __kretprobe_trampoline_handler().

    To avoid this issue, kretprobe_dispatcher() checks the get_kretprobe()
    return value again. And if it is NULL, it returns soon because that
    kretprobe is under unregistering process.

    This issue has been introduced when the kretprobe is decoupled
    from the struct kretprobe_instance by commit d741bf41d7
    ("kprobes: Remove kretprobe hash"). Before that commit, the
    struct kretprob_instance::rp directly points the kretprobe
    and it is never be NULL.

    Link: https://lkml.kernel.org/r/165366693881.797669.16926184644089588731.stgit@devnote2

    Reported-by: Yonghong Song <yhs@fb.com>
    Fixes: d741bf41d7 ("kprobes: Remove kretprobe hash")
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: bpf <bpf@vger.kernel.org>
    Cc: Kernel Team <kernel-team@fb.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Acked-by: Jiri Olsa <jolsa@kernel.org>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
2025-07-29 14:36:19 +02:00
Documentation Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2025-06-18 10:35:27 -03:00
arch Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
block Merge: block layer: misc fixes 2025-07-03 12:51:56 -03:00
certs certs: Add support for using elliptic curve keys for signing modules 2025-03-05 22:29:46 +08:00
crypto crypto: algif_hash - fix double free in hash_accept 2025-07-08 05:09:28 +00:00
drivers Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
fs Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
include Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
init Merge: cgroup: Backport upstream cgroup commits up to v6.12 2025-05-26 10:33:48 +02:00
io_uring io_uring/sqpoll: zero sqd->thread on tctx errors 2025-06-13 14:08:39 -04:00
ipc ipc/sem: use flexible array in 'struct sem_undo' 2025-03-21 11:02:00 -04:00
kernel tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher() 2025-07-29 14:36:19 +02:00
lib Merge: lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly() 2025-07-11 11:46:28 -03:00
mm Merge: CVE-2025-21693 mm: zswap: properly synchronize freeing resources during CPU hotunplug 2025-07-07 16:55:54 -03:00
net Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
redhat [redhat] kernel-5.14.0-600.el9 2025-07-15 15:56:25 -03:00
samples livepatch: convert timeouts to secs_to_jiffies() 2025-04-03 13:25:22 -04:00
scripts Merge: USB/TBT code rebase of supported drivers to upstream v6.14 2025-07-03 12:52:01 -03:00
security Merge: Update overlayfs to v6.7 2025-06-26 10:58:50 -03:00
sound ASoC: SOF: Intel: hda: do not use missing devm_kmalloc_array() 2025-06-13 20:11:54 +02:00
tools Merge: perf: Backport AMD Zen 5 event updates and IBS fixes 2025-07-15 15:53:42 -03:00
usr
virt kvm/vfio: Constify struct kvm_device_ops 2025-04-08 12:33:50 -06:00
.clang-format media: subdev: Add for_each_active_route() macro 2024-11-27 09:40:34 +08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore redhat: rhdocs: delete .get_maintainer.conf 2024-06-06 09:36:57 -04:00
.gitlab-ci.yml Merge tag 'kernel-5.14.0-570.3.1.el9_6' into 'main' 2025-03-10 17:24:30 -04:00
.mailmap
COPYING
CREDITS MAINTAINERS: Remove Mathieu Poirier as coresight maintainer 2025-01-04 13:51:08 -05:00
Kbuild
Kconfig
Kconfig.redhat
MAINTAINERS Merge: HyperV rebase to kernel 6.16-rc1 2025-07-15 15:53:50 -03:00
Makefile Merge: USB/TBT code rebase of supported drivers to upstream v6.14 2025-07-03 12:52:01 -03:00
Makefile.rhelver [redhat] kernel-5.14.0-600.el9 2025-07-15 15:56:25 -03:00
README
makefile

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.