From: "Cabiddu, Giovanni" <giovanni.cabiddu@intel.com>
To: Wang Hai <wanghai38@huawei.com>
Cc: <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
<ahsan.atta@intel.com>, <mun.chun.yep@intel.com>,
<markas.rapoportas@intel.com>, <damian.muszynski@intel.com>,
<furong.zhou@intel.com>, <adam.guerin@intel.com>,
<zhangxiaoxu5@huawei.com>, <qat-linux@intel.com>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: qat - Fix missing destroy_workqueue in adf_init_aer()
Date: Thu, 24 Oct 2024 16:04:27 +0100 [thread overview]
Message-ID: <ZxpeVD/D9Y7sfL7H@gcabiddu-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20241024140057.18548-1-wanghai38@huawei.com>
On Thu, Oct 24, 2024 at 10:00:57PM +0800, Wang Hai wrote:
> The adf_init_aer() won't destroy device_reset_wq when alloc_workqueue()
> for device_sriov_wq failed. Add destroy_workqueue for device_reset_wq to
> fix this issue.
>
> Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
> drivers/crypto/intel/qat/qat_common/adf_aer.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/intel/qat/qat_common/adf_aer.c b/drivers/crypto/intel/qat/qat_common/adf_aer.c
> index ec7913ab00a2..907144ec7e65 100644
> --- a/drivers/crypto/intel/qat/qat_common/adf_aer.c
> +++ b/drivers/crypto/intel/qat/qat_common/adf_aer.c
> @@ -281,8 +281,10 @@ int adf_init_aer(void)
> return -EFAULT;
>
> device_sriov_wq = alloc_workqueue("qat_device_sriov_wq", 0, 0);
> - if (!device_sriov_wq)
> + if (!device_sriov_wq) {
> + destroy_workqueue(device_reset_wq);
The missing destroy_workqueue() here is intentional as the device_reset_wq
is destroyed in adf_exit_aer() which is called if adf_init_aer() fails,
see [1].
With this change, destroy_workqueue() is called twice.
Regards,
--
Giovanni
[1] https://elixir.bootlin.com/linux/v6.11.5/source/drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c#L425
next prev parent reply other threads:[~2024-10-24 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 14:00 Wang Hai
2024-10-24 15:04 ` Cabiddu, Giovanni [this message]
2024-10-25 1:24 ` Wang Hai
2024-10-25 8:32 ` Cabiddu, Giovanni
2024-10-26 1:29 ` Wang Hai
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=ZxpeVD/D9Y7sfL7H@gcabiddu-mobl.ger.corp.intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=adam.guerin@intel.com \
--cc=ahsan.atta@intel.com \
--cc=damian.muszynski@intel.com \
--cc=davem@davemloft.net \
--cc=furong.zhou@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markas.rapoportas@intel.com \
--cc=mun.chun.yep@intel.com \
--cc=qat-linux@intel.com \
--cc=wanghai38@huawei.com \
--cc=zhangxiaoxu5@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®