diff options
| author | Nilay Shroff <nilay@linux.ibm.com> | 2026-07-13 17:24:18 +0530 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-28 10:37:49 -0700 |
| commit | e906dc2a33de221b4cb2b2b7ba2e03835f3ee40e (patch) | |
| tree | 06a6d68d80d1cc4405c5a8a7bb993935997a9b98 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 5de3b73cea44d2c5be7ae9ba9602755897ac2588 (diff) | |
nvme: fix context analysis warning in rdma.c
After adding Clang lock context annotations in rdma.c, Clang reports
the following warning when context analysis is enabled:
drivers/nvme/host/rdma.c:972:24: warning: passing pointer to variable 'list' requires holding mutex 'nvme_rdma_ctrl_mutex'
[-Wthread-safety-pointer]
972 | if (list_empty(&ctrl->list))
| ^
The warning is triggered because ctrl->list is annotated as being
protected by nvme_rdma_ctrl_mutex, but list_empty(&ctrl->list) is
invoked without holding that 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
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
