]> 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)
committerLeon Romanovsky <leon@kernel.org>
Thu, 18 Sep 2025 09:26:26 +0000 (05:26 -0400)
commit1428cd764cd708d53a072a2f208d87014bfe05bc
treedfcb296886a6ab395bb132a15637be483d1407b3
parent42f993d3439827c4959ea77e60620d7ebfb3a477
IB/sa: Fix sa_local_svc_timeout_ms read race

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>
drivers/infiniband/core/sa_query.c