mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: tanhuazhong@huawei.com, stable-commits@vger.kernel.org
Subject: Re: Patch "net: hns3: fix error handling int the hns3_get_vector_ring_chain" has been added to the 4.19-stable tree
Date: Thu, 28 Nov 2019 18:19:10 +0100	[thread overview]
Message-ID: <20191128171910.GA3471498@kroah.com> (raw)
In-Reply-To: <20191128150014.3202521787@mail.kernel.org>

On Thu, Nov 28, 2019 at 10:00:11AM -0500, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
> 
>     net: hns3: fix error handling int the hns3_get_vector_ring_chain
> 
> to the 4.19-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      net-hns3-fix-error-handling-int-the-hns3_get_vector_.patch
> and it can be found in the queue-4.19 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
> 
> 
> 
> commit 4b01732de5278618d8b013fa300638742392d507
> Author: Huazhong Tan <tanhuazhong@huawei.com>
> Date:   Tue Dec 18 19:37:48 2018 +0800
> 
>     net: hns3: fix error handling int the hns3_get_vector_ring_chain
>     
>     [ Upstream commit cda69d244585bc4497d3bb878c22fe2b6ad647c1 ]
>     
>     When hns3_get_vector_ring_chain() failed in the
>     hns3_nic_init_vector_data(), it should do the error handling instead
>     of return directly.
>     
>     Also, cur_chain should be freed instead of chain and head->next should
>     be set to NULL in error handling of hns3_get_vector_ring_chain.
>     
>     This patch fixes them.
>     
>     Fixes: 73b907a083b8 ("net: hns3: bugfix for buffer not free problem during resetting")
>     Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
>     Signed-off-by: Peng Li <lipeng321@huawei.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index 3708f149d0a6a..2f1c4adf1734d 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -2597,9 +2597,10 @@ err_free_chain:
>  	cur_chain = head->next;
>  	while (cur_chain) {
>  		chain = cur_chain->next;
> -		devm_kfree(&pdev->dev, chain);
> +		devm_kfree(&pdev->dev, cur_chain);
>  		cur_chain = chain;
>  	}
> +	head->next = NULL;
>  
>  	return -ENOMEM;
>  }
> @@ -2671,7 +2672,7 @@ static int hns3_nic_init_vector_data(struct hns3_nic_priv *priv)
>  		ret = hns3_get_vector_ring_chain(tqp_vector,
>  						 &vector_ring_chain);
>  		if (ret)
> -			return ret;
> +			goto map_ring_fail;
>  
>  		ret = h->ae_algo->ops->map_ring_to_vector(h,
>  			tqp_vector->vector_irq, &vector_ring_chain);

This breaks the build:
../drivers/net/ethernet/hisilicon/hns3/hns3_enet.c: In function ‘hns3_nic_init_vector_data’:
../drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2675:4: error: label ‘map_ring_fail’ used but not defined
 2675 |    goto map_ring_fail;
      |    ^~~~


So I'm going to drop it from the tree.

thanks,

greg k-h

           reply	other threads:[~2019-11-28 17:19 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20191128150014.3202521787@mail.kernel.org>]

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=20191128171910.GA3471498@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-commits@vger.kernel.org \
    --cc=tanhuazhong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

Powered by JetHome