summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2017-04-13 04:45:48 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-04-19 17:17:03 -0700
commite8d2f4c674571b2b2d8a58405196d4a390996e33 (patch)
treedef92f6290d4a17e1814fcff5726307f603f8d15 /fs/ocfs2/file.c
parentc768e490640dbb928d1c8a5f7b437a334d0cde44 (diff)
downloadlinux-e8d2f4c674571b2b2d8a58405196d4a390996e33.tar.bz2
i40e: fix CONFIG_BUSY checks in i40e_set_settings function
The check for I40E_CONFIG_BUSY state bit in the i40e_set_link_ksettings function is fishy. First we can notice a few things about the check here. First a similar check was introduced by commit 'c7d05ca89f8e ("i40e: driver ethtool core")' Later a commit introducing the link settings was added by commit 'bf9c71417f72 ("i40e: Implement set_settings for ethtool")' However, this second check was against vsi->state instead of pf->state, and also failed to set the bit, it only checks. That indicates the locking was not quite correct. The only other place that the state bit in vsi->state gets used is to protect the filter list. Since this code does not care about the mac filter list, and seems clear the original code should have set the pf->state bit. Fix these issues by using pf->state correctly, and by actually setting the bit so that we properly lock as expected. Since these checks occur while holding the rtnl_lock(), lets also add a timeout so that we don't potentially softlock the system. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'fs/ocfs2/file.c')
0 files changed, 0 insertions, 0 deletions