Hi Lars,

> -----Original Message-----
> From: Lars-Peter Clausen [mailto:[email protected]]
> Sent: Monday, February 06, 2017 9:40 PM
> 
> On 02/06/2017 01:30 PM, Yoshihiro Shimoda wrote:
> > From: Hiroyuki Yokoyama <[email protected]>
> >
> > This patch fixes the problem that occasionally released resources
> > before the end of interrupt processing.
> >
> > [   58.156412] Unable to handle kernel NULL pointer dereference at virtual
> >  address 00000000
> > [   58.166155] pgd = ffff8006f78b0000
> > [   58.169822] [00000000] *pgd=000000073773b003 , *pud=0000000737c70003 ,
> >  *pmd=0000000000000000
> > [   58.179738]
> > [   58.181548] Internal error: Oops: 96000046 [#1] PREEMPT SMP
> > [   58.187484] Modules linked in:
> > [   58.190919] CPU: 0 PID: 2898 Comm: dma_ioctl Not tainted 4.9.0-00002-g501
> > 07f2-dirty #147
> > [   58.199438] Hardware name: Renesas Salvator-X board based on r8a7795 (DT)
> > [   58.206680] task: ffff8006f77b1900 task.stack: ffff8006f7bd4000
> > [   58.213090] PC is at rcar_dmac_chan_prep_sg+0xa4/0x3f0
> > [   58.218725] LR is at rcar_dmac_chan_prep_sg+0x6c/0x3f0
> >
> > Signed-off-by: Hiroyuki Yokoyama <[email protected]>
> > Signed-off-by: Yoshihiro Shimoda <[email protected]>
> 
> How about implementing the synchronize() callback. This will fix not only
> this race condition, but also others that can result from the same issue.
> E.g. the completion callback still running after terminate() has completed.

Thank you for the suggestion!
I will investigate how to implement device_snchronize() in this driver.

Best regards,
Yoshihiro Shimoda

Reply via email to