lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 04 Jan 2012 11:35:59 -0800
From:	Maxim Uvarov <maxim.uvarov@...cle.com>
To:	David Miller <davem@...emloft.net>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH] bond_alb: do not disable BH under netpoll

On 01/04/2012 10:25 AM, David Miller wrote:
> From: Maxim Uvarov<maxim.uvarov@...cle.com>
> Date: Wed, 04 Jan 2012 00:14:39 -0800
>
>> On 03.01.2012 18:49, David Miller wrote:
>>> From: Maxim Uvarov<maxim.uvarov@...cle.com>
>>> 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<maxim.uvarov@...cle.com>
>>> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ