]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
IB/sa: Fix sa_local_svc_timeout_ms read race
authorVlad Dumitrescu <vdumitrescu@nvidia.com>
Tue, 16 Sep 2025 16:31:12 +0000 (19:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:35 +0000 (11:56 +0200)
commit976da9f2d242f497f5ea7437eee2ddfe05fd8eec
tree421b0e94e97b032974f31ac196fa9544adeb5451
parent4703174764ab41a80fbbab9cc1d5e029b9defbe7
IB/sa: Fix sa_local_svc_timeout_ms read race

[ Upstream commit 1428cd764cd708d53a072a2f208d87014bfe05bc ]

When computing the delta, the sa_local_svc_timeout_ms is read without
ib_nl_request_lock held. Though unlikely in practice, this can cause
a race condition if multiple local service threads are managing the
timeout.

Fixes: 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink")
Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Link: https://patch.msgid.link/20250916163112.98414-1-edwards@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/core/sa_query.c