Sparse says that you...

On Fri,  8 Jan 2021 18:31:58 +0200 Vladimir Oltean wrote:
> +     rcu_read_lock();
> +
> +     bond_for_each_slave_rcu(bond, slave, iter) {
> +             struct bonding_slave_dev *s;
> +
> +             s = kzalloc(sizeof(*s), GFP_ATOMIC);
> +             if (!s) {
> +                     rcu_read_unlock();

..unlock..

> +                     bond_put_slaves(slaves);
> +                     break;
> +             }
> +
> +             s->ndev = slave->dev;
> +             dev_hold(s->ndev);
> +             list_add_tail(&s->list, slaves);
> +             (*num_slaves)++;
> +     }
> +
> +     rcu_read_unlock();

..twice:

drivers/net/bonding/bond_main.c: note: in included file (...):
include/linux/rcupdate.h:700:9: warning: context imbalance in 'bond_get_stats' 
- unexpected unlock

Reply via email to