]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: narrow down the critical area of device_offload_lock
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 3 Sep 2019 04:31:04 +0000 (21:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 07:49:49 +0000 (09:49 +0200)
commit81bf882db95d3bb2e81f5c3b8276a0f118539607
tree28245dd137ae0f93b8c081f575c67e8146f98c7e
parent0fcc6f855e657517b1fc40c14e8119bf0efcc2ba
net/tls: narrow down the critical area of device_offload_lock

On setsockopt path we need to hold device_offload_lock from
the moment we check netdev is up until the context is fully
ready to be added to the tls_device_list.

No need to hold it around the get_netdev_for_sock().
Change the code and remove the confusing comment.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@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