diff options
| author | Zheng Qixing <zhengqixing@huawei.com> | 2025-07-01 15:17:17 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-24 08:58:35 +0200 |
| commit | 433737ca249921b08e4247d963e987856ddf1039 (patch) | |
| tree | 98fcc790a30146b6aab520cc3a70d95af5ba4c8a /tools/perf/scripts/python/stackcollapse.py | |
| parent | f25d31d7f3a0511e378f417fa006c938cc09f92c (diff) | |
| download | kernel-433737ca249921b08e4247d963e987856ddf1039.tar.gz | |
nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list()
[ Upstream commit 80d7762e0a42307ee31b21f090e21349b98c14f6 ]
When inserting a namespace into the controller's namespace list, the
function uses list_add_rcu() when the namespace is inserted in the middle
of the list, but falls back to a regular list_add() when adding at the
head of the list.
This inconsistency could lead to race conditions during concurrent
access, as users might observe a partially updated list. Fix this by
consistently using list_add_rcu() in both code paths to ensure proper
RCU protection throughout the entire function.
Fixes: be647e2c76b2 ("nvme: use srcu for iterating namespace list")
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
