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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080725183622.GA3107@ami.dom.local>
Date:	Fri, 25 Jul 2008 20:36:22 +0200
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Ingo Oeser <netdev@...eo.de>
Cc:	David Miller <davem@...emloft.net>, peterz@...radead.org,
	Larry.Finger@...inger.net, kaber@...sh.net,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-wireless@...r.kernel.org, mingo@...hat.com
Subject: Re: Kernel WARNING: at net/core/dev.c:1330
	__netif_schedule+0x2c/0x98()

On Fri, Jul 25, 2008 at 07:04:36PM +0200, Ingo Oeser wrote:
...
> I'm sure as hell, I miss sth. but can't it be done by this pseudo-code:

...And I really doubt it can't be done like this.

Jarek P.

> 
> netif_tx_lock(device)
> {
> 	mutex_lock(device->queue_entry_mutex);
> 	foreach_queue_entries(queue, device->queues)
> 	{
> 		spin_lock(queue->tx_lock);
> 		set_noop_tx_handler(queue);
> 		spin_unlock(queue->tx_lock);
> 	}
> 	mutex_unlock(device->queue_entry_mutex);
> }
> 
> netif_tx_unlock(device)
> {
> 	mutex_lock(device->queue_entry_mutex);
> 	foreach_queue_entries(queue, device->queues)
> 	{
> 		spin_lock(queue->tx_lock);
> 		set_useful_tx_handler(queue);
> 		spin_unlock(queue->tx_lock);
> 	}
> 	mutex_unlock(device->queue_entry_mutex);
> }
> 
> Then protect use of the queues by queue->tx_lock in transmit path.
> The first setup of the queue doesn't need to be protected, since no-one
> knows the device. The final cleanup of the device doesn't need to be
> protected either, because netif_tx_lock() and netif_tx_unlock() should
> not be called after entering the final cleanup.
> 
> Some VM locking works this way...
> 
> 
> Best Regards
> 
> Ingo Oeser
--
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