From: liulongfang <liulongfang@huawei.com>
To: Johan Hovold <johan@kernel.org>,
Weili Qian <qianweili@huawei.com>,
Zhou Wang <wangzhou1@hisilicon.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>
Cc: Kai Ye <yekai13@huawei.com>, <linux-crypto@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH] crypto: hisilicon/qm - fix device leak on QoS updates
Date: Mon, 24 Nov 2025 10:03:03 +0800 [thread overview]
Message-ID: <f7a83c28-af17-7479-0b39-ff3b06ee4b8c@huawei.com> (raw)
In-Reply-To: <20251121111130.25025-1-johan@kernel.org>
On 2025/11/21 19:11, Johan Hovold wrote:
> Make sure to drop the reference taken when looking up the PCI device on
> QoS updates.
>
> Fixes: 22d7a6c39cab ("crypto: hisilicon/qm - add pci bdf number check")
> Cc: stable@vger.kernel.org # 6.2
> Cc: Kai Ye <yekai13@huawei.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> drivers/crypto/hisilicon/qm.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index a5b96adf2d1e..ef6fdcc3dbcb 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -3871,11 +3871,14 @@ static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf,
> pdev = container_of(dev, struct pci_dev, dev);
> if (pci_physfn(pdev) != qm->pdev) {
> pci_err(qm->pdev, "the pdev input does not match the pf!\n");
> + put_device(dev);
> return -EINVAL;
> }
>
> *fun_index = pdev->devfn;
>
> + put_device(dev);
> +
> return 0;
> }
>
>
This issue has already been fixed by the following patch:
"[PATCH] crypto: hisilicon/qm - Fix device reference leak in qm_get_qos_value".
Thanks.
Longfang.
next prev parent reply other threads:[~2025-11-24 2:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 11:11 Johan Hovold
2025-11-24 2:03 ` liulongfang [this message]
2025-11-24 10:07 ` Johan Hovold
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=f7a83c28-af17-7479-0b39-ff3b06ee4b8c@huawei.com \
--to=liulongfang@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=johan@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qianweili@huawei.com \
--cc=stable@vger.kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=yekai13@huawei.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
all inboxes | Powered by JetHome®