lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <SJ0PR11MB5896C0AB0B355B4BFDC29041C3D02@SJ0PR11MB5896.namprd11.prod.outlook.com>
Date: Wed, 12 Mar 2025 18:24:54 +0000
From: "Karan Tilak Kumar (kartilak)" <kartilak@...co.com>
To: Chen Ni <nichen@...as.ac.cn>, "Satish Kharat (satishkh)"
	<satishkh@...co.com>, "Sesidhar Baddela (sebaddel)" <sebaddel@...co.com>,
	"James.Bottomley@...senPartnership.com"
	<James.Bottomley@...senPartnership.com>, "martin.petersen@...cle.com"
	<martin.petersen@...cle.com>, "linux-scsi@...r.kernel.org"
	<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: fnic: Remove redundant 'flush_workqueue()' calls

On Wednesday, March 12, 2025 12:43 AM, Chen Ni <nichen@...as.ac.cn> wrote:
>
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
>
> Remove the redundant 'flush_workqueue()' calls.
>
> This was generated with coccinelle:
>
> @@
> expression E;
> @@
> - flush_workqueue(E);
> destroy_workqueue(E);
>
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
> drivers/scsi/fnic/fnic_main.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
> index 0b20ac8c3f46..3dd06376e97b 100644
> --- a/drivers/scsi/fnic/fnic_main.c
> +++ b/drivers/scsi/fnic/fnic_main.c
> @@ -1365,10 +1365,9 @@ static void __exit fnic_cleanup_module(void)
> if (pc_rscn_handling_feature_flag == PC_RSCN_HANDLING_FEATURE_ON)
> destroy_workqueue(reset_fnic_work_queue);
>
> -     if (fnic_fip_queue) {
> -             flush_workqueue(fnic_fip_queue);
> +     if (fnic_fip_queue)
> destroy_workqueue(fnic_fip_queue);
> -     }
> +
> kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_MAX]);
> kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_DFLT]);
> kmem_cache_destroy(fnic_io_req_cache);
> --
> 2.25.1
>
>

Looks good to me.
Reviewed-by: Karan Tilak Kumar <kartilak@...co.com>

Regards,
Karan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ