Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-21 Thread Kuninori Morimoto
Hi Laurent > I don't think this fully fixes the problem, as the rcar_dmac_isr_error() IRQ > handler is still registered before all this. Furthermore, at least some of > the > initialization at the end of rcar_dmac_chan_probe() has to be moved before > the > rcar_dmac_isr_channel() IRQ

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-21 Thread Kuninori Morimoto
Hi Laurent > I don't think this fully fixes the problem, as the rcar_dmac_isr_error() IRQ > handler is still registered before all this. Furthermore, at least some of > the > initialization at the end of rcar_dmac_chan_probe() has to be moved before > the > rcar_dmac_isr_channel() IRQ

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-10 Thread Laurent Pinchart
enesas.com> > --- > > > Anton, Laurent > > I created this patch because noone posted it yesterday. > Anton, you can use this patch and replace Author to you if you want. > Thus, I used [RFC] on this patch I don't think you have, the subject line is still "Re: Possi

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-10 Thread Laurent Pinchart
this patch because noone posted it yesterday. > Anton, you can use this patch and replace Author to you if you want. > Thus, I used [RFC] on this patch I don't think you have, the subject line is still "Re: Possible null pointer dereference in rcar-dmac.ko" :-) > drivers/dma

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-09 Thread Kuninori Morimoto
Anton Volkov noticed that engine->dev is NULL before of_dma_controller_register() in probe. Thus there might be a NULL pointer dereference in rcar_dmac_chan_start_xfer while accessing chan->chan.device->dev which is equal to (>engine)->dev. To be more safety code, this patch initialize

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-09 Thread Kuninori Morimoto
Anton Volkov noticed that engine->dev is NULL before of_dma_controller_register() in probe. Thus there might be a NULL pointer dereference in rcar_dmac_chan_start_xfer while accessing chan->chan.device->dev which is equal to (>engine)->dev. To be more safety code, this patch initialize

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-09 Thread Laurent Pinchart
Hello, On Wednesday 09 Aug 2017 00:49:40 Kuninori Morimoto wrote: > Hi Anton > > # add Laurent > > > While searching for races in the Linux kernel I've come across > > "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came > > up with while analyzing results. Lines are given using

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-09 Thread Laurent Pinchart
Hello, On Wednesday 09 Aug 2017 00:49:40 Kuninori Morimoto wrote: > Hi Anton > > # add Laurent > > > While searching for races in the Linux kernel I've come across > > "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came > > up with while analyzing results. Lines are given using

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Kuninori Morimoto
Hi Anton # add Laurent > While searching for races in the Linux kernel I've come across > "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came > up with while analyzing results. Lines are given using the info from > Linux v4.12. > > Consider the following case: > > Thread 1:

Re: Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Kuninori Morimoto
Hi Anton # add Laurent > While searching for races in the Linux kernel I've come across > "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came > up with while analyzing results. Lines are given using the info from > Linux v4.12. > > Consider the following case: > > Thread 1:

Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1:

Possible null pointer dereference in rcar-dmac.ko

2017-08-08 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/dma/sh/rcar-dmac.ko" module. Here is a question that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1: