]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: Fix a sleep-in-atomic bug
authorJia-Ju Bai <baijiaju1990@163.com>
Wed, 14 Jun 2017 23:35:31 +0000 (16:35 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
commit28de6febba890481b79fa32705f23c6f5e6dd448
treed157885d9c441f8ba65b595756112cfc5fe661d7
parentbfc20159d51b744fbc12ae7b300d450551908890
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 <baijiaju1990@163.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 26785018
(cherry picked from commit 640f93cc6ea7327588be3cc0849d1342aac0393a)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c