From: Suanming Mou <suanmingm@mellanox.com>
To: "xiangxia.m.yue@gmail.com" <xiangxia.m.yue@gmail.com>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
Slava Ovsiienko <viacheslavo@mellanox.com>,
Matan Azrad <matan@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter table
Date: Fri, 17 Apr 2020 02:02:05 +0000 [thread overview]
Message-ID: <HE1PR05MB34841713F8342EFA5FA96B3CCCD90@HE1PR05MB3484.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1586940749-35960-1-git-send-email-xiangxia.m.yue@gmail.com>
Hi Tonghao,
Good catch.
Add maintainers.
Thanks,
SuanmingMou
> -----Original Message-----
> From: xiangxia.m.yue@gmail.com <xiangxia.m.yue@gmail.com>
> Sent: Wednesday, April 15, 2020 4:52 PM
> To: Suanming Mou <suanmingm@mellanox.com>;
> david.marchand@redhat.com
> Cc: dev@dpdk.org; Tonghao Zhang <xiangxia.m.yue@gmail.com>;
> stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix crash when releasing the meter table
>
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
>
> The meters of ports share the same meter table on the port. When releasing
> meters, don't check value returned using assert. Because other meters may
> reference to it.
>
> Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
> Fixes: 708aa5608f98 ("net/mlx5: fix meter suffix table leak")
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-off-by: Suanming Mou <suanmingm@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index ae00ca431eec..2174b9aa37dc
> 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -8552,11 +8552,9 @@ struct field_modify_info modify_tcp[] = {
> claim_zero(mlx5_glue->dv_destroy_flow_matcher
> (mtd->egress.any_matcher));
> if (mtd->egress.tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->egress.tbl));
> + flow_dv_tbl_resource_release(dev, mtd->egress.tbl);
> if (mtd->egress.sfx_tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->egress.sfx_tbl));
> + flow_dv_tbl_resource_release(dev, mtd->egress.sfx_tbl);
> if (mtd->ingress.color_matcher)
> claim_zero(mlx5_glue->dv_destroy_flow_matcher
> (mtd->ingress.color_matcher));
> @@ -8564,11 +8562,9 @@ struct field_modify_info modify_tcp[] = {
> claim_zero(mlx5_glue->dv_destroy_flow_matcher
> (mtd->ingress.any_matcher));
> if (mtd->ingress.tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->ingress.tbl));
> + flow_dv_tbl_resource_release(dev, mtd->ingress.tbl);
> if (mtd->ingress.sfx_tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->ingress.sfx_tbl));
> + flow_dv_tbl_resource_release(dev, mtd->ingress.sfx_tbl);
> if (mtd->transfer.color_matcher)
> claim_zero(mlx5_glue->dv_destroy_flow_matcher
> (mtd->transfer.color_matcher));
> @@ -8576,11 +8572,9 @@ struct field_modify_info modify_tcp[] = {
> claim_zero(mlx5_glue->dv_destroy_flow_matcher
> (mtd->transfer.any_matcher));
> if (mtd->transfer.tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->transfer.tbl));
> + flow_dv_tbl_resource_release(dev, mtd->transfer.tbl);
> if (mtd->transfer.sfx_tbl)
> - claim_zero(flow_dv_tbl_resource_release(dev,
> - mtd->transfer.sfx_tbl));
> + flow_dv_tbl_resource_release(dev, mtd->transfer.sfx_tbl);
> if (mtd->drop_actn)
> claim_zero(mlx5_glue->destroy_flow_action(mtd->drop_actn));
> rte_free(mtd);
> --
> 1.8.3.1
next prev parent reply other threads:[~2020-04-17 2:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 8:52 xiangxia.m.yue
2020-04-17 2:02 ` Suanming Mou [this message]
2020-04-21 7:47 ` Slava Ovsiienko
2020-04-21 15:02 ` Raslan Darawsheh
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=HE1PR05MB34841713F8342EFA5FA96B3CCCD90@HE1PR05MB3484.eurprd05.prod.outlook.com \
--to=suanmingm@mellanox.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.com \
--cc=xiangxia.m.yue@gmail.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;
as well as URLs for NNTP newsgroup(s).