[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQxII1gx0PbV_oLK@gondor.apana.org.au>
Date: Thu, 6 Nov 2025 15:02:59 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Weili Qian <qianweili@...wei.com>, Zhou Wang <wangzhou1@...ilicon.com>,
"David S. Miller" <davem@...emloft.net>,
Kai Ye <yekai13@...wei.com>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] crypto: hisilicon/qm - Fix device reference leak in
qm_get_qos_value
On Mon, Oct 27, 2025 at 11:09:34PM +0800, Miaoqian Lin wrote:
> The qm_get_qos_value() function calls bus_find_device_by_name() which
> increases the device reference count, but fails to call put_device()
> to balance the reference count and lead to a device reference leak.
>
> Add put_device() calls in both the error path and success path to
> properly balance the reference count.
>
> Found via static analysis.
>
> Fixes: 22d7a6c39cab ("crypto: hisilicon/qm - add pci bdf number check")
> Cc: stable@...r.kernel.org
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
> drivers/crypto/hisilicon/qm.c | 2 ++
> 1 file changed, 2 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists