From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Jiasheng Jiang <jiasheng@iscas.ac.cn>,
<dmitry.baryshkov@linaro.org>, <d-gole@ti.com>
Cc: <marex@denx.de>, <vkoul@kernel.org>, <sean@poorly.run>,
<vladimir.lypak@gmail.com>, <dri-devel@lists.freedesktop.org>,
<dianders@chromium.org>, <robdclark@gmail.com>, <daniel@ffwll.ch>,
<linux-arm-msm@vger.kernel.org>, <marijn.suijten@somainline.org>,
<freedreno@lists.freedesktop.org>, <airlied@gmail.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [Freedreno] [PATCH v3] drm/msm/dsi: Add missing check for alloc_ordered_workqueue
Date: Mon, 9 Jan 2023 19:30:34 -0800 [thread overview]
Message-ID: <b77b9426-a5cc-cdad-4cd5-a4fa97b32b04@quicinc.com> (raw)
In-Reply-To: <20230110021651.12770-1-jiasheng@iscas.ac.cn>
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@iscas.ac.cn>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.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;
next prev parent reply other threads:[~2023-01-10 3:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 2:16 Jiasheng Jiang
2023-01-10 3:30 ` Abhinav Kumar [this message]
2023-01-18 2:06 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b77b9426-a5cc-cdad-4cd5-a4fa97b32b04@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=d-gole@ti.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jiasheng@iscas.ac.cn \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=marijn.suijten@somainline.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=vkoul@kernel.org \
--cc=vladimir.lypak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®