]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Make service connection lookup always check for retry
authorDavid Howells <dhowells@redhat.com>
Mon, 4 Sep 2017 14:28:28 +0000 (15:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Sep 2017 21:39:17 +0000 (14:39 -0700)
commitdd2a56b1871978cc21508eb8d0b3291d7826d59e
tree2747b8d05e5dfb48bb9ed17eeab124b835797388
parente3a7b2a14365a49c9d4642592cc551a3555677c4
rxrpc: Make service connection lookup always check for retry

When an RxRPC service packet comes in, the target connection is looked up
by an rb-tree search under RCU and a read-locked seqlock; the seqlock retry
check is, however, currently skipped if we got a match, but probably
shouldn't be in case the connection we found gets replaced whilst we're
doing a search.

Make the lookup procedure always go through need_seqretry(), even if the
lookup was successful.  This makes sure we always pick up on a write-lock
event.

On the other hand, since we don't take a ref on the object, but rely on RCU
to prevent its destruction after dropping the seqlock, I'm not sure this is
necessary.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/conn_service.c