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: <Pine.LNX.4.64.0901141057110.31703@vixen.sonytel.be>
Date:	Wed, 14 Jan 2009 11:00:05 +0100 (CET)
From:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
cc:	netdev <netdev@...r.kernel.org>,
	linuxppc-dev list <linuxppc-dev@...abs.org>
Subject: Re: [PATCH] Add init_dummy_netdev() and fix EMAC driver using it

On Wed, 14 Jan 2009, Benjamin Herrenschmidt wrote:
> This adds an init_dummy_netdev() function that gets a network device
> structure (allocation and lifetime entirely under caller's control) and
> initialize the minimum amount of fields so it can be used to schedule
> NAPI polls without registering a full blown interface. This is to be
> used by drivers that need to tie several hardware interfaces to a single
> NAPI poll scheduler due to HW limitations.
> 
> It also updates the ibm_newemac driver to use that, this fixing the
> oops on 2.6.29 due to passing NULL as "dev" to netif_napi_add()
> 
> Symbol is exported GPL only a I don't think we want binary drivers doing
> that sort of acrobatics (if we want them at all).
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>

Thanks, this fixed my Sequoia!

Tested-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>

> --- linux-work.orig/include/linux/netdevice.h	2009-01-13 16:13:41.000000000 +1100
> +++ linux-work/include/linux/netdevice.h	2009-01-14 14:13:24.000000000 +1100
> @@ -4434,6 +4434,45 @@ err_uninit:
>  }
>  
>  /**
> + *	init_dummy_netdev	- init a dummy network device for NAPI
> + *	@dev: device to init
> + *
> + *	This takes a network device structure and initialize the minimum
                                                  ^^^^^^^^^^
						  initializes
> + *	amount of fields so it can be used to schedule NAPI polls without
> + *	registering a full blown interface. This is to be used by drivers
> + *	that need to tie several hardware interfaces to a single NAPI
> + *	poll scheduler due to HW limitations.
> + */
> +int init_dummy_netdev(struct net_device *dev)
> +{
> +	/* Clear everything. Note we don't initialize spinlocks
> +	 * are they aren't supposed to be taken by any of the
           ^^^
	   as
> +	 * NAPI code and this dummy netdev is supposed to be
> +	 * only ever used for NAPI polls
> +	 */

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@...ycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
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