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>] [day] [month] [year] [list]
Date:	Sun, 6 Mar 2016 00:00:11 +0000
From:	Fugang Duan <fugang.duan@....com>
To:	Nicholas Krause <xerofoify@...il.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"b38611@...escale.com" <b38611@...escale.com>,
	"andrew@...n.ch" <andrew@...n.ch>,
	"fabio.estevam@...escale.com" <fabio.estevam@...escale.com>,
	"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
	"rmk+kernel@....linux.org.uk" <rmk+kernel@....linux.org.uk>,
	"tremyfr@...il.com" <tremyfr@...il.com>,
	"johannes@...solutions.net" <johannes@...solutions.net>,
	"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
	"haokexin@...il.com" <haokexin@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RESEND] net:fec:Fix error checking in the function
 fec_enet_init

From: Nicholas Krause <xerofoify@...il.com> Sent: Saturday, March 05, 2016 4:00 AM
> To: davem@...emloft.net
> Cc: b38611@...escale.com; andrew@...n.ch; fabio.estevam@...escale.com;
> l.stach@...gutronix.de; rmk+kernel@....linux.org.uk; tremyfr@...il.com;
> johannes@...solutions.net; u.kleine-koenig@...gutronix.de;
> haokexin@...il.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH RESEND] net:fec:Fix error checking in the function
> fec_enet_init
> 
> This fixes error checking in the function fec_enet_init to properly check if the
> internal call to the function fec_enet_alloc_queue fails and if so immediately
> return the error code to the caller for it to handle it's own intended error paths.
> 
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index b349e6f..18c625f 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -3123,6 +3123,7 @@ static int fec_enet_init(struct net_device *ndev)
>  	dma_addr_t bd_dma;
>  	int bd_size;
>  	unsigned int i;
> +	int ret;
> 
>  #if defined(CONFIG_ARM)
>  	fep->rx_align = 0xf;
> @@ -3132,7 +3133,9 @@ static int fec_enet_init(struct net_device *ndev)
>  	fep->tx_align = 0x3;
>  #endif
> 
> -	fec_enet_alloc_queue(ndev);
> +	ret = fec_enet_alloc_queue(ndev);
> +	if (ret)
> +		return ret;
> 
>  	if (fep->bufdesc_ex)
>  		fep->bufdesc_size = sizeof(struct bufdesc_ex);
> --
> 2.1.4
Thanks.

Acked-by: Fugang Duan <Fugang.duan@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ