net/tls: use RCU for the adder to the offload record list
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 7 Sep 2019 05:29:58 +0000 (22:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Sep 2019 16:10:34 +0000 (18:10 +0200)
commitd4774ac0d49ae92c5176c9848db555e89a5a4e45
treed7368d446e09e07f4fd0ed6060d702dfb961c889
parent7ccd451912dd6407957676ae584248bdadc97b38
net/tls: use RCU for the adder to the offload record list

All modifications to TLS record list happen under the socket
lock. Since records form an ordered queue readers are only
concerned about elements being removed, additions can happen
concurrently.

Use RCU primitives to ensure the correct access types
(READ_ONCE/WRITE_ONCE).

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_device.c