diff options
| author | Alexander Potapenko <glider@google.com> | 2017-07-19 20:27:30 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-08 11:51:59 +0200 |
| commit | 1b94a87cf9888ad9675b65138a33608abd8fa067 (patch) | |
| tree | 5d09e3ba6ea5b013165ceed7f88a36696facda9c /tools/perf/scripts/python/call-graph-from-postgresql.py | |
| parent | 3d3df56e2a67bea5dfd7757f18b6bbf53fbb4341 (diff) | |
llist: clang: introduce member_address_is_nonnull()
commit beaec533fc2701a28a4d667f67c9f59c6e4e0d13 upstream.
Currently llist_for_each_entry() and llist_for_each_entry_safe() iterate
until &pos->member != NULL. But when building the kernel with Clang,
the compiler assumes &pos->member cannot be NULL if the member's offset
is greater than 0 (which would be equivalent to the object being
non-contiguous in memory). Therefore the loop condition is always true,
and the loops become infinite.
To work around this, introduce the member_address_is_nonnull() macro,
which casts object pointer to uintptr_t, thus letting the member pointer
to be NULL.
Signed-off-by: Alexander Potapenko <glider@google.com>
Tested-by: Sodagudi Prasad <psodagud@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions
