commit | 26c37d89f61d84dda55feefeafb4907f2a7cd944 | [log] [tgz] |
---|---|---|
author | Jakub Kicinski <kuba@kernel.org> | Sat Oct 30 16:15:01 2021 -0700 |
committer | David S. Miller <davem@davemloft.net> | Mon Nov 01 13:29:41 2021 +0000 |
tree | f74f0aacd8288855cdcbc2a3fba5739f0892d682 | |
parent | 1adc58ea2330cd014fde8a254480441e10ee280d [diff] |
netdevsim: take rtnl_lock when assigning num_vfs Legacy VF NDOs look at num_vfs and then based on that index into vfconfig. If we don't rtnl_lock() num_vfs may get set to 0 and vfconfig freed/replaced while the NDO is running. We don't need to protect replacing vfconfig since it's only done when num_vfs is 0. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>