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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE=gft5JaQZEvujP68mhe9ANzLThBLRtr+mCrNWFRxkSDZYLmA@mail.gmail.com>
Date:   Tue, 7 Aug 2018 10:09:39 -0700
From:   Evan Green <evgreen@...omium.org>
To:     mka@...omium.org
Cc:     Vinayak Holikatti <vinholikatti@...il.com>,
        jejb@...ux.vnet.ibm.com, martin.petersen@...cle.com,
        subhashj@...eaurora.org, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Doug Anderson <dianders@...omium.org>, sboyd@...nel.org
Subject: Re: [PATCH] scsi: ufs: Check workqueue exists before destroying it

On Wed, Aug 1, 2018 at 5:14 PM Matthias Kaehlcke <mka@...omium.org> wrote:
>
> In ufshcd_hba_exit() the clock gating workqueue is always destroyed
> when clock gating is supported. However the workqueue pointer is NULL
> when ufshcd_init() fails before the workqueue is created. Only destroy
> the workqueue if it exists.
>
> Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
> ---
>  drivers/scsi/ufs/ufshcd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 397081d320b1..401f7dbe2981 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7190,7 +7190,8 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
>                 if (ufshcd_is_clkscaling_supported(hba)) {
>                         if (hba->devfreq)
>                                 ufshcd_suspend_clkscaling(hba);
> -                       destroy_workqueue(hba->clk_scaling.workq);
> +                       if (hba->clk_scaling.workq)
> +                               destroy_workqueue(hba->clk_scaling.workq);
>                         ufshcd_devfreq_remove(hba);
>                 }
>                 ufshcd_setup_clocks(hba, false);
> --
> 2.18.0.597.ga71716f1ad-goog
>

Reviewed-by: Evan Green <evgreen@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ