diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-11-18 15:09:58 -0800 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-11-23 10:38:52 +0100 |
| commit | da198fa75403535626b91cfddff7c2189b5f894f (patch) | |
| tree | d5819d67bc181a62e9b819f63e88b5d67b9bd66f /tools/lib/python | |
| parent | af1a4ab4bf3bcb969ad5ee9e7fca1d23703adf32 (diff) | |
cleanup: Disable context analysis for __free() helpers
The __free_##_name() helper functions defined by DEFINE_FREE() call the
free expression that has been passed to DEFINE_FREE(). If that
expression releases a lock, e.g. because it is a call to an unlock
function, the Clang thread-safety analyzer complains because it cannot
know that the variable that is passed to the helper function holds a
lock. This is needed by:
- __drm_for_each_bridge_in_chain_cleanup (include/drm/drm_bridge.h),
used by drm_for_each_bridge_in_chain_scoped() and
drm_for_each_bridge_in_chain_from_scoped().
- netdev_unlock (net/core/dev.h), used by for_each_netdev_lock_scoped().
- netdev_unlock_ops_compat (net/core/dev.h), used by
for_each_netdev_lock_ops_compat_scoped().
Disable context analysis for the __free() helper functions via
__context_unsafe().
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Marco Elver <elver@google.com>
Link: https://patch.msgid.link/d87cfee3aa630885cbdb95f0f918e86a1263c2ec.1795043161.git.bvanassche@acm.org
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
