Thread (21 messages) flat view 21 messages, 3 authors, 2021-01-11

Re: [PATCH v5 net-next 15/16] net: bonding: ensure .ndo_get_stats64 can sleep

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-01-09 01:43:43

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help