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]
Date:	Mon, 27 Aug 2007 10:09:51 -0700
From:	"Kok, Auke" <auke-jan.h.kok@...el.com>
To:	James Chapman <jchapman@...alix.com>
CC:	netdev@...r.kernel.org, e1000-devel@...ts.sourceforge.net
Subject: Re: [E1000-devel] [PATCH net-2.6.24] e100: fix driver init lockup
 on	e100_up()

James Chapman wrote:
> Recent NAPI changes require that napi_enable() is always matched with
> a napi_disable(). This patch makes sure that this invariant holds for
> e100. It also moves the netif_napi_add() call until after private
> pointers have been intialized, though this might only be significant
> for cases where netpoll is being used.
> 
> Signed-off-by: James Chapman <jchapman@...alix.com>
> 
> diff --git a/drivers/net/e100.c b/drivers/net/e100.c
> index e25f5ec..48996a4 100644
> --- a/drivers/net/e100.c
> +++ b/drivers/net/e100.c
> @@ -2575,11 +2575,12 @@ static int __devinit e100_probe(struct pci_dev *pdev,
>  	strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
>  
>  	nic = netdev_priv(netdev);
> -	netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
>  	nic->netdev = netdev;
>  	nic->pdev = pdev;
>  	nic->msg_enable = (1 << debug) - 1;
>  	pci_set_drvdata(pdev, netdev);
> +	netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
> +	napi_disable(&nic->napi);

Just wondering, could we even reverse this order? IOW disable NAPI first, then 
add it ?

Otherwise this sounds OK to me.

Auke
-
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