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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b77b9426-a5cc-cdad-4cd5-a4fa97b32b04@quicinc.com>
Date:   Mon, 9 Jan 2023 19:30:34 -0800
From:   Abhinav Kumar <quic_abhinavk@...cinc.com>
To:     Jiasheng Jiang <jiasheng@...as.ac.cn>,
        <dmitry.baryshkov@...aro.org>, <d-gole@...com>
CC:     <marex@...x.de>, <vkoul@...nel.org>, <sean@...rly.run>,
        <vladimir.lypak@...il.com>, <dri-devel@...ts.freedesktop.org>,
        <dianders@...omium.org>, <robdclark@...il.com>, <daniel@...ll.ch>,
        <linux-arm-msm@...r.kernel.org>, <marijn.suijten@...ainline.org>,
        <freedreno@...ts.freedesktop.org>, <airlied@...il.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [Freedreno] [PATCH v3] drm/msm/dsi: Add missing check for
 alloc_ordered_workqueue



On 1/9/2023 6:16 PM, Jiasheng Jiang wrote:
> Add check for the return value of alloc_ordered_workqueue as it may return
> NULL pointer and cause NULL pointer dereference.
> 
> Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
Reviewed-by: Abhinav Kumar <quic_abhinavk@...cinc.com>
> ---
> Changelog:
> 
> v2 -> v3:
> 
> 1. Simply return -ENOMEM instead of using ret.
> 2. No change of the "goto fail".
> 
> v1 -> v2:
> 
> 1. Change the "goto fail" into "return ret" and drop the "fail" label.
> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 89aadd3b3202..f167a45f1fbd 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -1977,6 +1977,9 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi)
>   
>   	/* setup workqueue */
>   	msm_host->workqueue = alloc_ordered_workqueue("dsi_drm_work", 0);
> +	if (!msm_host->workqueue)
> +		return -ENOMEM;
> +
>   	INIT_WORK(&msm_host->err_work, dsi_err_worker);
>   
>   	msm_dsi->id = msm_host->id;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ