rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock()
authorOleg Nesterov <oleg@redhat.com>
Fri, 17 Nov 2023 16:48:46 +0000 (17:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:16 +0000 (20:14 +0000)
commit0cb7eafed540ba88ef054ddb30832b1fa72d6107
treec3d5a7b3f3cc5085fcb4468dad26219e908a2a76
parent08ade0fa61033ab91a740f0ac44874181370eeba
rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock()

[ Upstream commit bad1a11c0f061aa073bab785389fe04f19ba02e1 ]

rxrpc_find_service_conn_rcu() should make the "seq" counter odd on the
second pass, otherwise read_seqbegin_or_lock() never takes the lock.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/20231117164846.GA10410@redhat.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rxrpc/conn_service.c