diff options
| author | Nilay Shroff <nilay@linux.ibm.com> | 2026-07-13 17:24:20 +0530 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-28 10:37:55 -0700 |
| commit | 521b1587de93650950d59b59b058bf5c24230973 (patch) | |
| tree | 498e88100f06e2371a7db6b38a4b043448d2866e /tools/perf/scripts/python/stackcollapse.py | |
| parent | 27a75a6290d610b40e4ef8024bef2acf7e3268ce (diff) | |
nvme: fix context analysis warning in tcp.c
After adding Clang context annotations, compiling tcp.c reports the
following warning while context analysis is enabled:
drivers/nvme/host/tcp.c:2572:24: warning: passing pointer to variable 'list' requires holding mutex 'nvme_tcp_ctrl_mutex'
[-Wthread-safety-pointer]
2572 | if (list_empty(&ctrl->list))
| ^
The above warning is triggered because ctrl->list is guarded with mutex
nvme_tcp_ctrl_mutex but when list_empty(&ctrl->list) is invoked it
doesn't acquire nvme_tcp_ctrl_mutex.
Replace list_empty() with list_empty_careful(), which is intended
for lockless inspection of list heads during teardown when no concurrent
list modifications are expected. This suppresses the corresponding
Clang context analysis warning while preserving the existing behavior.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
