]> Git Repo - linux.git/commit
i40e: Fix a sleep-in-atomic bug
authorJia-Ju Bai <[email protected]>
Wed, 14 Jun 2017 23:35:31 +0000 (16:35 -0700)
committerDavid S. Miller <[email protected]>
Thu, 15 Jun 2017 03:45:22 +0000 (23:45 -0400)
commit640f93cc6ea7327588be3cc0849d1342aac0393a
tree3136ed9256db392079abe637e3a386cb103c5933
parent849a44de91636c24cea799cb8ad8c36433feb913
i40e: Fix a sleep-in-atomic bug

The driver may sleep under a spin lock, and the function call path is:
i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh)
  i40e_vsi_remove_pvid
    i40e_vlan_stripping_disable
      i40e_aq_update_vsi_params
        i40e_asq_send_command
          mutex_lock --> may sleep

To fixed it, the spin lock is released before "i40e_vsi_remove_pvid", and
the lock is acquired again after this function.

Signed-off-by: Jia-Ju Bai <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
This page took 0.052619 seconds and 4 git commands to generate.