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: <CAAOTY__qnvFX4NB0G878S_J-mug4sTfynAukLGSD1xoMHKGdqA@mail.gmail.com>
Date:   Fri, 25 Jun 2021 17:05:48 +0800
From:   Chun-Kuang Hu <chunkuang.hu@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Jassi Brar <jassisinghbrar@...il.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Yongqiang Niu <yongqiang.niu@...iatek.com>,
        Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mailbox: mtk-cmdq: Fix uninitialized variable in cmdq_mbox_flush()

Hi, Dan:

Dan Carpenter <dan.carpenter@...cle.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@...nel.org>

>
> Fixes: 4a3cb0303984 ("mailbox: mtk-cmdq: Use mailbox rx_callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ