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: <53424E8E.6030908@atmel.com>
Date:	Mon, 7 Apr 2014 09:06:54 +0200
From:	Nicolas Ferre <nicolas.ferre@...el.com>
To:	Gilles Chanteperdrix <gilles.chanteperdrix@...omai.org>,
	<netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: [PATCH] net/at91_ether: avoid NULL pointer dereference

On 06/04/2014 20:37, Gilles Chanteperdrix :
> The at91_ether driver calls macb_mii_init passing a 'struct macb'
> structure whose tx_clk member is initialized to 0. However,
> macb_handle_link_change() expects tx_clk to be the result of
> a call to clk_get, and so IS_ERR(tx_clk) to be true if the clock
> is invalid. This causes an oops when booting Linux 3.14 on the
> csb637 board. The following changes avoids this.
> 
> Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@...omai.org>

Acked-by: Nicolas Ferre <nicolas.ferre@...el.com>

Thanks for this fix. Bye,

> ---
>  drivers/net/ethernet/cadence/at91_ether.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c
> index ce75de9..4a79eda 100644
> --- a/drivers/net/ethernet/cadence/at91_ether.c
> +++ b/drivers/net/ethernet/cadence/at91_ether.c
> @@ -342,6 +342,9 @@ static int __init at91ether_probe(struct platform_device *pdev)
>  	}
>  	clk_enable(lp->pclk);
>  
> +	lp->hclk = ERR_PTR(-ENOENT);
> +	lp->tx_clk = ERR_PTR(-ENOENT);
> +
>  	/* Install the interrupt handler */
>  	dev->irq = platform_get_irq(pdev, 0);
>  	res = devm_request_irq(&pdev->dev, dev->irq, at91ether_interrupt, 0, dev->name, dev);
> 


-- 
Nicolas Ferre
--
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