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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 May 2020 19:02:20 -0700
From:   Bart Van Assche <>
To:     Avri Altman <>,
        "James E . J . Bottomley" <>,
        "Martin K . Petersen" <>,,
        Zang Leigang <>,
        Avi Shchislowski <>,
        Bean Huo <>,,,
        Sang-yoon Oh <>,
        yongmyung lee <>,
        Jinyoung CHOI <>
Subject: Re: [RFC PATCH 05/13] scsi: ufs: ufshpb: Disable HPB if no
 HPB-enabled luns

On 2020-05-15 03:30, Avri Altman wrote:
> @@ -368,6 +390,8 @@ int ufshpb_probe(struct ufs_hba *hba)
>  	if (ret)
>  		goto out;
> +	INIT_DELAYED_WORK(&hba->hpb_disable_work, ufshpb_disable_work);
> +	schedule_delayed_work(&hba->hpb_disable_work, 60 * HZ);
>  out:
>  	kfree(dev_desc);
>  	if (ret) {

Calling INIT_DELAYED_WORK() just before schedule_delayed_work() is a bad
practice. If cancel_delayed_work() gets called before
INIT_DELAYED_WORK() then it will encounter something that it not
expects. If cancel_delayed_work() and INIT_DELAYED_WORK() get called
concurrently than that will trigger a race condition. It is better to
call INIT_DELAYED_WORK() from the context that allocates the data
structure in which the work structure is embedded.



Powered by blists - more mailing lists