mirror of
https://github.com/torvalds/linux.git
synced 2025-11-05 03:00:13 +02:00
When checking available canonical candidates for struct/union algorithm
utilizes btf_dedup_is_equiv to determine if candidate is suitable. This
check is not enough when candidate is corresponding FWD for that
struct/union, because according to equivalence logic they are
equivalent. When it so happens that FWD and STRUCT/UNION end in hashing
to the same bucket, it's possible to create remapping loop from FWD to
STRUCT and STRUCT to same FWD, which will cause btf_dedup() to loop
forever.
This patch fixes the issue by additionally checking that type and
canonical candidate are strictly equal (utilizing btf_equal_struct).
Fixes:
|
||
|---|---|---|
| .. | ||
| api | ||
| bpf | ||
| lockdep | ||
| subcmd | ||
| symbol | ||
| traceevent | ||
| bitmap.c | ||
| find_bit.c | ||
| hweight.c | ||
| rbtree.c | ||
| str_error_r.c | ||
| string.c | ||
| vsprintf.c | ||