Skip to content

Commit

Permalink
sfc: remove duplicate up_write on VF filter_sem
Browse files Browse the repository at this point in the history
Somehow two copies of the line 'up_write(&vf->efx->filter_sem);' got into
 efx_ef10_sriov_set_vf_vlan().  This would put the mutex in a bad state and
 cause all subsequent down attempts to hang.

Fixes: 671b53e ("sfc: Ensure down_write(&filter_sem) and up_write() are matched before calling efx_net_open()")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Edward Cree authored and David S. Miller committed Jun 20, 2017
1 parent db833d4 commit 57f0c9c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/sfc/ef10_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,6 @@ int efx_ef10_sriov_set_vf_vlan(struct efx_nic *efx, int vf_i, u16 vlan,
up_write(&vf->efx->filter_sem);
mutex_unlock(&vf->efx->mac_lock);

up_write(&vf->efx->filter_sem);

rc2 = efx_net_open(vf->efx->net_dev);
if (rc2)
goto reset_nic;
Expand Down

0 comments on commit 57f0c9c

Please sign in to comment.