public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes•dk>
To: Byungho An <bh74.an@samsung•com>
Cc: Girish K S <ks.giri@samsung•com>,
	netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe()
Date: Tue, 22 Mar 2016 20:47:02 +0100	[thread overview]
Message-ID: <877fgue1mx.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <8737s0d7iz.fsf@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Tue, 08 Mar 2016 21:44:20 +0100")

ping^2

On Tue, Mar 08 2016, Rasmus Villemoes <linux@rasmusvillemoes•dk> wrote:

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

  reply	other threads:[~2016-03-22 19:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 20:11 [PATCH 0/5] pre-decrement in error paths considered harmful Rasmus Villemoes
2016-02-09 20:11 ` [PATCH 3/5] net/mlx4: fix some error handling in mlx4_multi_func_init() Rasmus Villemoes
2016-02-10  9:40   ` Yishai Hadas
2016-02-10 18:15     ` Rasmus Villemoes
2016-02-11  9:29       ` Jack Morgenstein
2016-02-11 10:20         ` Jack Morgenstein
2016-02-11 16:02   ` Doug Ledford
2016-02-09 20:11 ` [PATCH 4/5] net: sxgbe: fix error paths in sxgbe_platform_probe() Rasmus Villemoes
2016-03-08 20:44   ` Rasmus Villemoes
2016-03-22 19:47     ` Rasmus Villemoes [this message]
2016-03-26 21:24       ` [PATCH] " Rasmus Villemoes
2016-03-27  8:22         ` Francois Romieu
2016-03-27 21:40           ` Rasmus Villemoes
2016-03-28  2:39           ` David Miller
2016-03-28  2:40         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fgue1mx.fsf@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes$(echo .)dk \
    --cc=bh74.an@samsung$(echo .)com \
    --cc=ks.giri@samsung$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox