From: Saeed Mahameed <saeedm@mellanox.com>
To: "songliubraving@fb.com" <songliubraving@fb.com>,
"hawk@kernel.org" <hawk@kernel.org>,
"kafai@fb.com" <kafai@fb.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kpsingh@chromium.org" <kpsingh@chromium.org>,
"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
"leon@kernel.org" <leon@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ast@kernel.org" <ast@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"xiongx18@fudan.edu.cn" <xiongx18@fudan.edu.cn>,
"yhs@fb.com" <yhs@fb.com>, "andriin@fb.com" <andriin@fb.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Tariq Toukan <tariqt@mellanox.com>
Cc: "xiyuyang19@fudan.edu.cn" <xiyuyang19@fudan.edu.cn>,
"tanxin.ctf@gmail.com" <tanxin.ctf@gmail.com>,
"yuanxzhang@fudan.edu.cn" <yuanxzhang@fudan.edu.cn>
Subject: Re: [PATCH v2] net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq
Date: Thu, 30 Jul 2020 23:18:10 +0000 [thread overview]
Message-ID: <913f7fe1d895bc5b80b42e92304d086c6a550193.camel@mellanox.com> (raw)
In-Reply-To: <20200730102941.5536-1-xiongx18@fudan.edu.cn>
On Thu, 2020-07-30 at 18:29 +0800, Xin Xiong wrote:
> The function invokes bpf_prog_inc(), which increases the reference
> count of a bpf_prog object "rq->xdp_prog" if the object isn't NULL.
>
> The refcount leak issues take place in two error handling paths. When
> either mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the
> function
> simply returns the error code and forgets to drop the reference count
> increased earlier, causing a reference count leak of "rq->xdp_prog".
>
> Fix this issue by jumping to the error handling path
> err_rq_wq_destroy
> while either function fails.
>
> Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ objects for different
> RQ
> types")
>
Please don't break the line of the fixes tag.
I will fix this up.
> Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn>
> Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
> ---
> v1 -> v2:
> - Amended parts of wording to be better understood
> - Added Fixes tag
> ---
Applied to net-mlx5, Thanks !
prev parent reply other threads:[~2020-07-30 23:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-30 10:29 [PATCH v2] net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq Xin Xiong
2020-07-30 23:16 ` Jakub Kicinski
2020-07-30 23:18 ` Saeed Mahameed [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=913f7fe1d895bc5b80b42e92304d086c6a550193.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=tanxin.ctf@gmail.com \
--cc=tariqt@mellanox.com \
--cc=xiongx18@fudan.edu.cn \
--cc=xiyuyang19@fudan.edu.cn \
--cc=yhs@fb.com \
--cc=yuanxzhang@fudan.edu.cn \
/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).