From: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
To: David Marchand <david.marchand@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>,
Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
Subject: RE: [EXT] [PATCH] graph: fix node shrink
Date: Thu, 19 Jan 2023 13:57:52 +0000 [thread overview]
Message-ID: <BYAPR18MB2965692CCF7350644B862622ACC49@BYAPR18MB2965.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20230119103234.841173-1-david.marchand@redhat.com>
> -----Original Message-----
> From: David Marchand <david.marchand@redhat.com>
> Sent: 19 January 2023 04:03 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Kiran
> Kumar Kokkilagadda <kirankumark@marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@marvell.com>
> Subject: [EXT] [PATCH] graph: fix node shrink
>
> External Email
>
> ----------------------------------------------------------------------
> If the node id check failed, graph_lock was not taken before releasing.
>
> Fixes: c59dac2ca14a ("graph: implement node operations")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Kiran Kumar Kokkilagadda <kirankumark@marvell.com>
> ---
> lib/graph/node.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/graph/node.c b/lib/graph/node.c index fc6345de07..149414dcd9
> 100644
> --- a/lib/graph/node.c
> +++ b/lib/graph/node.c
> @@ -300,16 +300,16 @@ rte_node_edge_shrink(rte_node_t id, rte_edge_t
> size)
> if (node->id == id) {
> if (node->nb_edges < size) {
> rte_errno = E2BIG;
> - goto fail;
> + } else {
> + node->nb_edges = size;
> + rc = size;
> }
> - node->nb_edges = size;
> - rc = size;
> break;
> }
> }
>
> -fail:
> graph_spinlock_unlock();
> +fail:
> return rc;
> }
>
> --
> 2.39.0
next prev parent reply other threads:[~2023-01-19 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 10:32 David Marchand
2023-01-19 13:57 ` Kiran Kumar Kokkilagadda [this message]
2023-01-23 13:32 ` Jerin Jacob
2023-01-23 13:50 ` David Marchand
2023-01-23 13:53 ` Jerin Jacob
2023-01-31 10:13 ` David Marchand
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=BYAPR18MB2965692CCF7350644B862622ACC49@BYAPR18MB2965.namprd18.prod.outlook.com \
--to=kirankumark@marvell.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=pbhagavatula@marvell.com \
--cc=stable@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).