Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1353400 > unrolled thread

Re: [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe()

Started byRasmus Villemoes <linux@rasmusvillemoes.dk>
First post2016-03-08 21:50 +0100
Last post2016-03-08 21:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe() Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-03-08 21:50 +0100

#1353400 — Re: [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe()

FromRasmus Villemoes <linux@rasmusvillemoes.dk>
Date2016-03-08 21:50 +0100
SubjectRe: [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe()
Message-ID<rawJR-659-51@gated-at.bofh.it>
ping

On Tue, Feb 09 2016, Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:

> We need to use post-decrement to ensure that irq_dispose_mapping is
> also called on priv->rxq[0]->irq_no; moreover, if one of the above for
> loops failed already at i==0 (so we reach one of these labels with
> that value of i), we'll enter an essentially infinite loop of
> out-of-bounds accesses.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
>  drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
> index b02eed12bfc5..73427e29df2a 100644
> --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
> +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
> @@ -155,11 +155,11 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_rx_irq_unmap:
> -	while (--i)
> +	while (i--)
>  		irq_dispose_mapping(priv->rxq[i]->irq_no);
>  	i = SXGBE_TX_QUEUES;
>  err_tx_irq_unmap:
> -	while (--i)
> +	while (i--)
>  		irq_dispose_mapping(priv->txq[i]->irq_no);
>  	irq_dispose_mapping(priv->irq);
>  err_drv_remove:

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web