patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Min Hu (Connor)" <humin29@huawei.com>
To: Thierry Herbelot <thierry.herbelot@6wind.com>, <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>, <stable@dpdk.org>,
	"Cristian Dumitrescu" <cristian.dumitrescu@intel.com>,
	Jasvinder Singh <jasvinder.singh@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] sched: check newly allocated pointer
Date: Mon, 24 May 2021 20:14:46 +0800
Message-ID: <1bbd10bb-c721-d079-ccd0-7dab42743886@huawei.com> (raw)
In-Reply-To: <20210524113023.28553-1-thierry.herbelot@6wind.com>

Hi, Thierry,
	This bug has been fixed in my earlier patch, please refer to:
https://patches.dpdk.org/project/dpdk/patch/1619175672-20016-2-git-send-email-humin29@huawei.com/

	Thanks.


在 2021/5/24 19:30, Thierry Herbelot 写道:
> Check port->subport_profiles after it was allocated.
> 
> Fixes: 0ea4c6afcaf14 ("sched: add subport profile table")
> Cc: stable@dpdk.org
> Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> Cc: Jasvinder Singh <jasvinder.singh@intel.com>
> 
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> --
> V2: reword patch title
> ---
>   lib/sched/rte_sched.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
> index cd87e688e489..4a2c0e27550d 100644
> --- a/lib/sched/rte_sched.c
> +++ b/lib/sched/rte_sched.c
> @@ -961,7 +961,7 @@ rte_sched_port_config(struct rte_sched_port_params *params)
>   	/* Allocate memory to store the subport profile */
>   	port->subport_profiles  = rte_zmalloc_socket("subport_profile", size2,
>   					RTE_CACHE_LINE_SIZE, params->socket);
> -	if (port == NULL) {
> +	if (port->subport_profiles == NULL) {
>   		RTE_LOG(ERR, SCHED, "%s: Memory allocation fails\n", __func__);
>   
>   		return NULL;
> 

      parent reply	other threads:[~2021-05-24 12:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  8:57 [dpdk-stable] [PATCH] rte_sched: " Thierry Herbelot
2021-05-24 11:28 ` Dumitrescu, Cristian
2021-05-24 11:30 ` [dpdk-stable] [PATCH v2] sched: " Thierry Herbelot
2021-05-24 11:31   ` Dumitrescu, Cristian
2021-05-24 12:14   ` Min Hu (Connor) [this message]

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=1bbd10bb-c721-d079-ccd0-7dab42743886@huawei.com \
    --to=humin29@huawei.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=stable@dpdk.org \
    --cc=thierry.herbelot@6wind.com \
    --cc=thomas@monjalon.net \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git