[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABb+yY04Fdv16RKAOZ=Tr7KnEOCJnXpGF0pEgy8DjREqEixiqA@mail.gmail.com>
Date: Thu, 1 Mar 2018 19:02:34 +0530
From: Jassi Brar <jassisinghbrar@...il.com>
To: Samuel Holland <samuel@...lland.org>
Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>,
Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh+dt@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
", linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, srv_heupstream"
<linux-arm-kernel@...ts.infradead.org>,
Devicetree List <devicetree@...r.kernel.org>,
Andre Przywara <andre.przywara@....com>
Subject: Re: [PATCH 2/3] mailbox: Avoid NULL dereference in mbox_chan_received_data
On Wed, Feb 28, 2018 at 7:57 AM, Samuel Holland <samuel@...lland.org> wrote:
> If a reception IRQ is pending when a mailbox channel is shut down (for
> example, if the controller uses threaded interrupts), it is possible for
> mbox_chan_received_data to be called while chan->cl is NULL.
>
We can add a check in mailbox.c, but that is like shoving it under the carpet.
How does your code look like? mbox_chan_received_data() is meant to
be called from interrupt context as its documentation says.
Also the controller driver is responsible for ceasing any transient
xfer before returning from shutdown() callback.
Cheers!
Powered by blists - more mailing lists