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]
Date:   Fri, 22 Oct 2021 11:49:08 +0100
From:   John Garry <john.garry@...wei.com>
To:     Cai Huoqing <caihuoqing@...du.com>
CC:     Saurav Kashyap <skashyap@...vell.com>,
        Javed Hasan <jhasan@...vell.com>,
        <GR-QLogic-Storage-Upstream@...vell.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: bnx2fc: Make use of the helper macro kthread_run()

On 21/10/2021 09:42, Cai Huoqing wrote:
> Repalce kthread_create/wake_up_process() with kthread_run()

Replace

> to simplify the code.
> 
> Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
> ---
>   drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index 71fa62bd3083..975512511a60 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -2723,9 +2723,8 @@ static int __init bnx2fc_mod_init(void)
>   
>   	bg = &bnx2fc_global;
>   	skb_queue_head_init(&bg->fcoe_rx_list);
> -	l2_thread = kthread_create(bnx2fc_l2_rcv_thread,
> -				   (void *)bg,
> -				   "bnx2fc_l2_thread");
> +	l2_thread = kthread_run(bnx2fc_l2_rcv_thread,
> +				(void *)bg, "bnx2fc_l2_thread");
>   	if (IS_ERR(l2_thread)) {
>   		rc = PTR_ERR(l2_thread);
>   		goto free_wq;

Are you then supposed to remove the wake_up_process() call also (not shown)?

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ