Skip to content

Commit

Permalink
Merge tag 'probes-fixes-v6.8-rc4' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/trace/linux-trace

Pull probes fix from Masami Hiramatsu:

 - tracing/probes: Fix BTF structure member finder to find the members
   which are placed after any anonymous union member correctly.

* tag 'probes-fixes-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/probes: Fix to search structure fields correctly
  • Loading branch information
torvalds committed Feb 17, 2024
2 parents 55f626f + 9704669 commit ad645de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/trace_btf.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const struct btf_member *btf_find_struct_member(struct btf *btf,
for_each_member(i, type, member) {
if (!member->name_off) {
/* Anonymous union/struct: push it for later use */
type = btf_type_skip_modifiers(btf, member->type, &tid);
if (type && top < BTF_ANON_STACK_MAX) {
if (btf_type_skip_modifiers(btf, member->type, &tid) &&
top < BTF_ANON_STACK_MAX) {
anon_stack[top].tid = tid;
anon_stack[top++].offset =
cur_offset + member->offset;
Expand Down

0 comments on commit ad645de

Please sign in to comment.