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:	Tue, 25 Nov 2014 14:33:52 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	cascardo@...ux.vnet.ibm.com
Cc:	netdev@...r.kernel.org, prashant@...adcom.com, mchan@...adcom.com
Subject: Re: [PATCH] tg3: fix ring init when there are more TX than RX
 channels

From: Thadeu Lima de Souza Cascardo <cascardo@...ux.vnet.ibm.com>
Date: Tue, 25 Nov 2014 14:21:11 -0200

> @@ -8563,7 +8563,8 @@ static int tg3_init_rings(struct tg3 *tp)
>  		if (tnapi->rx_rcb)
>  			memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
>  
> -		if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
> +		if (tnapi->prodring.rx_std &&
> +		    tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
>  			tg3_free_rings(tp);
>  			return -ENOMEM;

Maybe a better test is "i < tp->rxq_cnt"?  This is what is used in
tg3_mem_rx_acquire() to determine if tg3_rx_prodring_init() happens.
--
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