diff options
author | Eric Dumazet <edumazet@google.com> | 2012-10-03 19:18:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-04 15:53:48 -0400 |
commit | b3c581d5d7130fc7f2eab9ab14c8de8882b42380 (patch) | |
tree | ab901b485b68f3deb3a2f4ccd44b97d2563b3f9e /drivers/net/team/team.c | |
parent | 49ee49202b4ac4be95d05e4bf24a9ac8b54c5528 (diff) |
team: set qdisc_tx_busylock to avoid LOCKDEP splat
If a qdisc is installed on a team device, its possible to get
a lockdep splat under stress, because nested dev_queue_xmit() can
lock busylock a second time (on a different device, so its a false
positive)
Avoid this problem using a distinct lock_class_key for team
devices.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r-- | drivers/net/team/team.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 5c7547c4f802..d44cca327588 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c | |||
@@ -1315,6 +1315,7 @@ static const struct team_option team_options[] = { | |||
1315 | 1315 | ||
1316 | static struct lock_class_key team_netdev_xmit_lock_key; | 1316 | static struct lock_class_key team_netdev_xmit_lock_key; |
1317 | static struct lock_class_key team_netdev_addr_lock_key; | 1317 | static struct lock_class_key team_netdev_addr_lock_key; |
1318 | static struct lock_class_key team_tx_busylock_key; | ||
1318 | 1319 | ||
1319 | static void team_set_lockdep_class_one(struct net_device *dev, | 1320 | static void team_set_lockdep_class_one(struct net_device *dev, |
1320 | struct netdev_queue *txq, | 1321 | struct netdev_queue *txq, |
@@ -1327,6 +1328,7 @@ static void team_set_lockdep_class(struct net_device *dev) | |||
1327 | { | 1328 | { |
1328 | lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key); | 1329 | lockdep_set_class(&dev->addr_list_lock, &team_netdev_addr_lock_key); |
1329 | netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL); | 1330 | netdev_for_each_tx_queue(dev, team_set_lockdep_class_one, NULL); |
1331 | dev->qdisc_tx_busylock = &team_tx_busylock_key; | ||
1330 | } | 1332 | } |
1331 | 1333 | ||
1332 | static int team_init(struct net_device *dev) | 1334 | static int team_init(struct net_device *dev) |