Thread (9 messages) 9 messages, 5 authors, 2015-08-29

Re: [PATCH net v2] bonding: fix bond_poll_controller bh_enable warning

From: David Miller <davem@davemloft.net>
Date: 2015-08-28 21:13:52

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Fri, 28 Aug 2015 10:22:20 -0700
The problem is rcu_read_unlock_bh() which triggers a warning when
irqs are disabled.  ndo_poll_controller can run with bh enabled,
disabled or irqs disabled so check if that is the case and acquire
rcu_read_lock_bh only when not running with disabled irqs.
I would say that having hard irqs disabled is a strict requirement, as
per the debugging test in netpoll_send_skb_on_dev():

	WARN_ON_ONCE(!irqs_disabled());

If you want to add the same check to netpoll_send_udp(), that's fine.

But what isn't fine is adding all of this conditional locking, we want
->poll_controller() implementations to be able to depend upon the IRQ
environment they execute in, otherwise every single implementation
might need to have ugly conditional locking as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help