netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: netdev@vger.kernel.org
Cc: jesse@kernel.org, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH net-next v5 03/10] ixgbe: add rtnl locking in service task around vxlan_get_rx_port
Date: Mon, 11 Jan 2016 13:17:24 +0100	[thread overview]
Message-ID: <1452514651-15445-4-git-send-email-hannes@stressinduktion.org> (raw)
In-Reply-To: <1452514651-15445-1-git-send-email-hannes@stressinduktion.org>

Protect IXGBE_FLAG2_VXLAN_REREG_NEEDED flag with rtnl_lock as it seems
it could be concurrently modified by ixgbe_set_features and
ixgbe_del_vxlan_port.

Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c4003a88bbf6ea..85ec389bd46560 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7118,10 +7118,12 @@ static void ixgbe_service_task(struct work_struct *work)
 		return;
 	}
 #ifdef CONFIG_IXGBE_VXLAN
+	rtnl_lock();
 	if (adapter->flags2 & IXGBE_FLAG2_VXLAN_REREG_NEEDED) {
 		adapter->flags2 &= ~IXGBE_FLAG2_VXLAN_REREG_NEEDED;
 		vxlan_get_rx_port(adapter->netdev);
 	}
+	rtnl_unlock();
 #endif /* CONFIG_IXGBE_VXLAN */
 	ixgbe_reset_subtask(adapter);
 	ixgbe_phy_interrupt_subtask(adapter);
-- 
2.5.0

  parent reply	other threads:[~2016-01-11 12:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 12:17 [PATCH net-next v5 00/10] net: break dependency of drivers on geneve and vxlan Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 01/10] qlcnic: protect qlcnic_82xx_io_slot_reset with rtnl lock Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 02/10] mlx4: add rtnl lock protection in mlx4_en_restart Hannes Frederic Sowa
2016-01-11 12:17 ` Hannes Frederic Sowa [this message]
2016-01-11 12:17 ` [PATCH net-next v5 04/10] benet: add rtnl lock protection around be_open in be_resume Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 05/10] fm10k: add rtnl lock protection in fm10k_io_resume Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 06/10] netdev: add netdevice notifier type to trigger a reprogramming of offloads Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 07/10] vxlan: break dependency to network drivers Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 08/10] geneve: " Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 09/10] net: harmonize vxlan_get_rx_port and geneve_get_rx_port to netdev_refresh_offloads Hannes Frederic Sowa
2016-01-11 12:17 ` [PATCH net-next v5 10/10] netdev: update comments and explain idempotency and rtnl locking Hannes Frederic Sowa
2016-01-12 21:33 ` [PATCH net-next v5 00/10] net: break dependency of drivers on geneve and vxlan David Miller
2016-01-12 22:17   ` Hannes Frederic Sowa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452514651-15445-4-git-send-email-hannes@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).