Skip to content

Commit

Permalink
[PATCH] bonding: lockdep annotation
Browse files Browse the repository at this point in the history
=============================================
[ INFO: possible recursive locking detected ]
2.6.17-1.2600.fc6 #1

Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Peter Zijlstra authored and Jeff Garzik committed Nov 10, 2006
1 parent 088406b commit 0daa230
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond_params *params)
return 0;
}

static struct lock_class_key bonding_netdev_xmit_lock_key;

/* Create a new bond based on the specified name and bonding parameters.
* Caller must NOT hold rtnl_lock; we need to release it here before we
* set up our sysfs entries.
Expand Down Expand Up @@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_params *params, struct bonding **newbond
if (res < 0) {
goto out_bond;
}

lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key);

if (newbond)
*newbond = bond_dev->priv;

Expand Down

0 comments on commit 0daa230

Please sign in to comment.