From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Uvarov Subject: Re: [PATCH] bond_alb: do not disable BH under netpoll Date: Wed, 04 Jan 2012 11:35:59 -0800 Message-ID: <4F04AA1F.10004@oracle.com> References: <1325643618-3051-1-git-send-email-maxim.uvarov@oracle.com> <20120103.214919.346240095248499387.davem@davemloft.net> <4F040A6F.2000002@oracle.com> <20120104.132510.1521809723158602749.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: David Miller Return-path: Received: from rcsinet15.oracle.com ([148.87.113.117]:62916 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908Ab2ADTiZ (ORCPT ); Wed, 4 Jan 2012 14:38:25 -0500 In-Reply-To: <20120104.132510.1521809723158602749.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On 01/04/2012 10:25 AM, David Miller wrote: > From: Maxim Uvarov > Date: Wed, 04 Jan 2012 00:14:39 -0800 > >> On 03.01.2012 18:49, David Miller wrote: >>> From: Maxim Uvarov >>> Date: Tue, 3 Jan 2012 18:20:18 -0800 >>> >>>> Do not disable BH if interrupts are already disabled >>>> (netpoll case). >>>> Signed-off-by: Maxim Uvarov >>> Barf... >>> >>> We should never use conditional locking like this. >> >> >> How about change spin_lock_bh to spin_lock_irqsave at this place? > > Then it's ambiguous whether it's a softirq safe lock or a hardirq > safe one. > > It's just another way to make the locking inconsistent. at bond_start_xmit() there is check if it's netpoll or not: /* * If we risk deadlock from transmitting this in the * netpoll path, tell netpoll to queue the frame for later tx */ if (is_netpoll_tx_blocked(dev)) return NETDEV_TX_BUSY; which is in the end: static inline int netpoll_tx_running(struct net_device *dev) { return irqs_disabled(); } So the original patch was in the way as it already implemented. BTW, I'm trying to remove warning generated by local_bh_enable_ip: http://marc.info/?l=linux-netdev&m=132528368523980&w=2 Maxim.