From: Kev Jackson <foamdino@gmail.com>
To: Saeed Mahameed <saeedm@mellanox.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: linux-kernel@vger.kernel.org, alasdair.mcwilliam@thehutgroup.com,
kevin.jackson@thehutgroup.com
Subject: [PATCH] mlx5e: Correct order of closing qs on error
Date: Thu, 8 Jul 2021 11:21:39 +0100 [thread overview]
Message-ID: <YObRs9tjVfGb9/Jn@linux-dev> (raw)
When attempting to open queues for a channel, on error the goto for
mlx5e_open_rq and mlx5e_open_xdpsq are inverted. This could lead to a q
not being correctly closed.
Signed-off-by: Kev Jackson <foamdino@gmail.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a836a02a2116..bf12a7790fac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1858,21 +1858,21 @@ static int mlx5e_open_queues(struct mlx5e_channel *c,
err = mlx5e_open_rq(c, params, &cparam->rq, NULL, NULL, &c->rq);
if (err)
- goto err_close_xdp_sq;
+ goto err_close_rq;
err = mlx5e_open_xdpsq(c, params, &cparam->xdp_sq, NULL, &c->xdpsq, true);
if (err)
- goto err_close_rq;
+ goto err_close_xdp_sq;
return 0;
-err_close_rq:
- mlx5e_close_rq(&c->rq);
-
err_close_xdp_sq:
if (c->xdp)
mlx5e_close_xdpsq(&c->rq_xdpsq);
+err_close_rq:
+ mlx5e_close_rq(&c->rq);
+
err_close_sqs:
mlx5e_close_sqs(c);
--
2.30.2
reply other threads:[~2021-07-08 10:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=YObRs9tjVfGb9/Jn@linux-dev \
--to=foamdino@gmail.com \
--cc=alasdair.mcwilliam@thehutgroup.com \
--cc=davem@davemloft.net \
--cc=kevin.jackson@thehutgroup.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saeedm@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.