* dma: jz4740: Null pointer dereference
@ 2014-07-08 16:41 Stefan Agner
2014-07-08 16:50 ` Lars-Peter Clausen
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2014-07-08 16:41 UTC (permalink / raw)
To: lars; +Cc: linux-mips
Hi Lars,
While looking through different DMA drivers, just stumbled upon this
inside jz4740_dma_chan_irq:
if (chan->next_sg == chan->desc->num_sgs) {
chan->desc = NULL;
vchan_cookie_complete(&chan->desc->vdesc);
^ null pointer dereference
}
I'm not sure what the correct fix is, hence I thought I report it to you
as author of the driver.
--
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: dma: jz4740: Null pointer dereference
2014-07-08 16:41 dma: jz4740: Null pointer dereference Stefan Agner
@ 2014-07-08 16:50 ` Lars-Peter Clausen
0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2014-07-08 16:50 UTC (permalink / raw)
To: Stefan Agner; +Cc: linux-mips
On 07/08/2014 06:41 PM, Stefan Agner wrote:
> Hi Lars,
>
> While looking through different DMA drivers, just stumbled upon this
> inside jz4740_dma_chan_irq:
>
> if (chan->next_sg == chan->desc->num_sgs) {
> chan->desc = NULL;
> vchan_cookie_complete(&chan->desc->vdesc);
> ^ null pointer dereference
> }
>
> I'm not sure what the correct fix is, hence I thought I report it to you
> as author of the driver.
Hi,
Thanks for the report. Yes this is a bug and I have a fix for it. Currently
that codepath is not exercised though (no non-cyclic users of the JZ4740
dmaengine driver), so the fix is not critical. It will be sent upstream soon
together which a couple of other patches for this driver.
- Lars
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-08 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08 16:41 dma: jz4740: Null pointer dereference Stefan Agner
2014-07-08 16:50 ` Lars-Peter Clausen
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.