[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABb+yY1a+TUE=+-kc6tbRU8mrxz6eDvnwOUnGOFfcm7vat+niQ@mail.gmail.com>
Date: Tue, 15 Dec 2020 15:20:54 -0600
From: Jassi Brar <jassisinghbrar@...il.com>
To: Haidong Yao <yaohaidong369@...il.com>
Cc: natechancellor@...il.com, ndesaulniers@...gle.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
clang-built-linux@...glegroups.com,
Orson Zhai <orsonzhai@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Haidong Yao <haidong.yao@...soc.com>
Subject: Re: [PATCH] add chan->cl check in mbox_chan_received_data()
On Tue, Dec 15, 2020 at 2:48 AM Haidong Yao <yaohaidong369@...il.com> wrote:
> --- a/drivers/mailbox/mailbox.c
> +++ b/drivers/mailbox/mailbox.c
> @@ -152,7 +152,7 @@ static enum hrtimer_restart txdone_hrtimer(struct hrtimer *hrtimer)
> void mbox_chan_received_data(struct mbox_chan *chan, void *mssg)
> {
> /* No buffering the received data */
> - if (chan->cl->rx_callback)
> + if (chan->cl && chan->cl->rx_callback)
> chan->cl->rx_callback(chan->cl, mssg);
> }
The proper fix is in the controller driver. Which should stop tx/rx
when the channel is freed.
thnx.
Powered by blists - more mailing lists