net/netvsc: manage VF port under read/write lock
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 30 Apr 2020 19:08:51 +0000 (12:08 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 20:27:39 +0000 (22:27 +0200)
commit81938ebb542f1ce19254f58705583a7f48a95216
tree8a50a3fc9bf202020d8722c74bb0ec3bcc58f007
parent33fd81cdb517d1188175b154533206158e815fde
net/netvsc: manage VF port under read/write lock

With multiple channels, the primary channel may receive notification
that VF has been added or removed while secondary channel is in
process of doing receive or transmit.  Resolve this race by converting
existing vf_lock to a reader/writer lock.

Users of lock (tx/rx/stats) acquire for read, and actions like
add/remove acquire it for write.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/netvsc/hn_ethdev.c
drivers/net/netvsc/hn_rxtx.c
drivers/net/netvsc/hn_var.h
drivers/net/netvsc/hn_vf.c