Showing error 1125

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: drivers/net/bonding/bond_main.c
Line in file: 1883
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-29 14:49:11 UTC


Source:

1853        bond_compute_features(bond);
1854
1855        if (bond->primary_slave == slave) {
1856                bond->primary_slave = NULL;
1857        }
1858
1859        if (oldcurrent == slave) {
1860                bond_change_active_slave(bond, NULL);
1861        }
1862
1863        if ((bond->params.mode == BOND_MODE_TLB) ||
1864            (bond->params.mode == BOND_MODE_ALB)) {
1865                /* Must be called only after the slave has been
1866                 * detached from the list and the curr_active_slave
1867                 * has been cleared (if our_slave == old_current),
1868                 * but before a new active slave is selected.
1869                 */
1870                write_unlock_bh(&bond->lock);
1871                bond_alb_deinit_slave(bond, slave);
1872                write_lock_bh(&bond->lock);
1873        }
1874
1875        if (oldcurrent == slave) {
1876                /*
1877                 * Note that we hold RTNL over this sequence, so there
1878                 * is no concern that another slave add/remove event
1879                 * will interfere.
1880                 */
1881                write_unlock_bh(&bond->lock);
1882                read_lock(&bond->lock);
1883                write_lock_bh(&bond->curr_slave_lock);
1884
1885                bond_select_active_slave(bond);
1886
1887                write_unlock_bh(&bond->curr_slave_lock);
1888                read_unlock(&bond->lock);
1889                write_lock_bh(&bond->lock);
1890        }
1891
1892        if (bond->slave_cnt == 0) {
1893                bond_set_carrier(bond);
Show full sources