From: Jacob Keller Date: Wed, 27 Jul 2016 19:02:33 +0000 (-0700) Subject: i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62fe2a865e6ddc92f574bafacf8376613d8c08f2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git i40evf: add missing rtnl_lock() around i40evf_set_interrupt_capability The function calls netif_set_real_num_(tx|rx)_queues, both of which should be done only under rntl lock. Unfortunately the i40evf_init_task did not hold the rtnl_lock as necessary. This patch adds the locking needed. Change-ID: Ib72a21c3ce22b71a226b16f9bbe0f5f8cc3e849b Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index 600fb9c4a7f0..d1d4a653686a 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -1420,7 +1420,9 @@ int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter) { int err; + rtnl_lock(); err = i40evf_set_interrupt_capability(adapter); + rtnl_unlock(); if (err) { dev_err(&adapter->pdev->dev, "Unable to setup interrupt capabilities\n");