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: <SN6PR04MB49251FBA9EFB10A277FD8C5EFC5F0@SN6PR04MB4925.namprd04.prod.outlook.com>
Date:   Tue, 26 Mar 2019 14:17:35 +0000
From:   Avri Altman <Avri.Altman@....com>
To:     Aditya Pakki <pakki001@....edu>
CC:     "kjlu@....edu" <kjlu@....edu>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Pedro Sousa <pedrom.sousa@...opsys.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Subhash Jadavani <subhashj@...eaurora.org>,
        Asutosh Das <asutoshd@...eaurora.org>,
        Marc Gonzalez <marc.w.gonzalez@...e.fr>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Ohad Sharabi <ohad.sharabi@....com>,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs: Fix to check the return value of
 alloc_ordered_workqueue

Hi,
> 
> In ufshcd_init_clk_gating, alloc_ordered_workqueue may fail and return
> NULL. The patch handles error consistent with other invocations in this
> module.
Not sure that's good enough, as later on we will try to queue work to that workqueue.

Thanks,
Avri


> 
> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
>  drivers/scsi/ufs/ufshcd.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index e040f9dd9ff3..701b2da25f09 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1791,6 +1791,8 @@ static void ufshcd_init_clk_gating(struct ufs_hba
> *hba)
>  		 hba->host->host_no);
>  	hba->clk_gating.clk_gating_workq =
> alloc_ordered_workqueue(wq_name,
> 
> WQ_MEM_RECLAIM);
> +	if (!hba->clk_gating.clk_gating_workq)
> +		dev_err(hba->dev, "Failed to allocate work queue\n");
> 
>  	hba->clk_gating.is_enabled = true;
> 
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ