All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Yongqiang Niu <yongqiang.niu@mediatek.com>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush()
Date: Fri, 25 Jun 2021 17:05:48 +0800	[thread overview]
Message-ID: <CAAOTY__qnvFX4NB0G878S_J-mug4sTfynAukLGSD1xoMHKGdqA@mail.gmail.com> (raw)
In-Reply-To: <YNHg5NuJILrrBIZ/@mwanda>

Hi, Dan:

Dan Carpenter <dan.carpenter@oracle.com> 於 2021年6月22日 週二 下午9:09寫道:
>
> The "cb" pointer needs to be initialized before can assign
> "data.data = cb->data;".

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Fixes: 4a3cb0303984 ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 301e65b9527a..67a42b514429 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -455,10 +455,10 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
>
>         list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
>                                  list_entry) {
> +               cb = &task->pkt->async_cb;
>                 data.sta = -ECONNABORTED;
>                 data.data = cb->data;
>                 data.pkt = task->pkt;
> -               cb = &task->pkt->async_cb;
>                 if (cb->cb)
>                         cb->cb(data);
>
> --
> 2.30.2
>

WARNING: multiple messages have this Message-ID (diff)
From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Yongqiang Niu <yongqiang.niu@mediatek.com>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush()
Date: Fri, 25 Jun 2021 17:05:48 +0800	[thread overview]
Message-ID: <CAAOTY__qnvFX4NB0G878S_J-mug4sTfynAukLGSD1xoMHKGdqA@mail.gmail.com> (raw)
In-Reply-To: <YNHg5NuJILrrBIZ/@mwanda>

Hi, Dan:

Dan Carpenter <dan.carpenter@oracle.com> 於 2021年6月22日 週二 下午9:09寫道:
>
> The "cb" pointer needs to be initialized before can assign
> "data.data = cb->data;".

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Fixes: 4a3cb0303984 ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 301e65b9527a..67a42b514429 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -455,10 +455,10 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
>
>         list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
>                                  list_entry) {
> +               cb = &task->pkt->async_cb;
>                 data.sta = -ECONNABORTED;
>                 data.data = cb->data;
>                 data.pkt = task->pkt;
> -               cb = &task->pkt->async_cb;
>                 if (cb->cb)
>                         cb->cb(data);
>
> --
> 2.30.2
>

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Yongqiang Niu <yongqiang.niu@mediatek.com>,
	Chun-Kuang Hu <chunkuang.hu@kernel.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 "moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush()
Date: Fri, 25 Jun 2021 17:05:48 +0800	[thread overview]
Message-ID: <CAAOTY__qnvFX4NB0G878S_J-mug4sTfynAukLGSD1xoMHKGdqA@mail.gmail.com> (raw)
In-Reply-To: <YNHg5NuJILrrBIZ/@mwanda>

Hi, Dan:

Dan Carpenter <dan.carpenter@oracle.com> 於 2021年6月22日 週二 下午9:09寫道:
>
> The "cb" pointer needs to be initialized before can assign
> "data.data = cb->data;".

Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>

>
> Fixes: 4a3cb0303984 ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/mailbox/mtk-cmdq-mailbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index 301e65b9527a..67a42b514429 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -455,10 +455,10 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
>
>         list_for_each_entry_safe(task, tmp, &thread->task_busy_list,
>                                  list_entry) {
> +               cb = &task->pkt->async_cb;
>                 data.sta = -ECONNABORTED;
>                 data.data = cb->data;
>                 data.pkt = task->pkt;
> -               cb = &task->pkt->async_cb;
>                 if (cb->cb)
>                         cb->cb(data);
>
> --
> 2.30.2
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-06-25  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 13:08 [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush() Dan Carpenter
2021-06-22 13:08 ` Dan Carpenter
2021-06-22 13:08 ` Dan Carpenter
2021-06-25  9:05 ` Chun-Kuang Hu [this message]
2021-06-25  9:05   ` Chun-Kuang Hu
2021-06-25  9:05   ` Chun-Kuang Hu

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=CAAOTY__qnvFX4NB0G878S_J-mug4sTfynAukLGSD1xoMHKGdqA@mail.gmail.com \
    --to=chunkuang.hu@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=yongqiang.niu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.