From: Jesse Brandeburg Date: Mon, 4 Jan 2016 18:33:06 +0000 (-0800) Subject: i40e: fix: do not sleep in netdev_ops X-Git-Tag: v4.1.12-92~189^2~123 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9272e33387ccfb21b18a985512fae170bf22049f;p=users%2Fjedix%2Flinux-maple.git i40e: fix: do not sleep in netdev_ops Orabug: 22342532 The driver was being called by VLAN, bonding, teaming operations that expected to be able to hold locks like rcu_read_lock(). This causes the driver to be held to the requirement to not sleep, and was found by the kernel debug options for checking sleep inside critical section, and the locking validator. Change-ID: Ibc68c835f5ffa8ffe0638ffe910a66fc5649a7f7 Signed-off-by: Jesse Brandeburg Reviewed-by: Nelson, Shannon Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher (cherry picked from commit c53934c6d1b11c676dafed04294cd906fc9ff5d3) Signed-off-by: Brian Maly --- diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index e3a9df775747..77c4956c62da 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1533,7 +1533,11 @@ static int i40e_set_mac(struct net_device *netdev, void *p) ether_addr_copy(netdev->dev_addr, addr->sa_data); - return i40e_sync_vsi_filters(vsi); + /* schedule our worker thread which will take care of + * applying the new filter changes + */ + i40e_service_event_schedule(vsi->back); + return 0; } /** @@ -1757,6 +1761,11 @@ bottom_of_search_loop: vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED; vsi->back->flags |= I40E_FLAG_FILTER_SYNC; } + + /* schedule our worker thread which will take care of + * applying the new filter changes + */ + i40e_service_event_schedule(vsi->back); } /**