Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-19 Thread Mauro Carvalho Chehab
Em Tue, 19 Dec 2017 09:01:41 + Fabien DESSENNE escreveu: > On 16/12/17 15:14, Mauro Carvalho Chehab wrote: > > Em Sat, 16 Dec 2017 19:53:55 +0800 > > Jia-Ju Bai escreveu: > > > >> Hi, > >> > >> On 2017/12/15 22:51, Fabien DESSENNE wrote: >

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-19 Thread Fabien DESSENNE
On 16/12/17 15:14, Mauro Carvalho Chehab wrote: > Em Sat, 16 Dec 2017 19:53:55 +0800 > Jia-Ju Bai escreveu: > >> Hi, >> >> On 2017/12/15 22:51, Fabien DESSENNE wrote: >>> Hi >>> >>> On 12/12/17 14:47, Jia-Ju Bai wrote: The driver may sleep under a spinlock. The

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-16 Thread Mauro Carvalho Chehab
Em Sat, 16 Dec 2017 19:53:55 +0800 Jia-Ju Bai escreveu: > Hi, > > On 2017/12/15 22:51, Fabien DESSENNE wrote: > > Hi > > > > On 12/12/17 14:47, Jia-Ju Bai wrote: > >> The driver may sleep under a spinlock. > >> The function call path is: > >> bdisp_device_run (acquire

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-16 Thread Jia-Ju Bai
Hi, On 2017/12/15 22:51, Fabien DESSENNE wrote: Hi On 12/12/17 14:47, Jia-Ju Bai wrote: The driver may sleep under a spinlock. The function call path is: bdisp_device_run (acquire the spinlock) bdisp_hw_reset msleep --> may sleep To fix it, msleep is replaced with mdelay. May I

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-15 Thread Fabien DESSENNE
Hi On 12/12/17 14:47, Jia-Ju Bai wrote: > The driver may sleep under a spinlock. > The function call path is: > bdisp_device_run (acquire the spinlock) >bdisp_hw_reset > msleep --> may sleep > > To fix it, msleep is replaced with mdelay. May I suggest you to use

Re: [PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-15 Thread Hans Verkuil
Fabien or Benjamin, can you take a look at these two patches? I'm a bit hesitant applying this since e.g. this bdisp_hw_reset() function might wait for up to a second, which is a mite long for an interrupt :-) Regards, Hans On 12/12/17 14:47, Jia-Ju Bai wrote: > The driver may sleep

[PATCH 1/2] bdisp: Fix a possible sleep-in-atomic bug in bdisp_hw_reset

2017-12-12 Thread Jia-Ju Bai
The driver may sleep under a spinlock. The function call path is: bdisp_device_run (acquire the spinlock) bdisp_hw_reset msleep --> may sleep To fix it, msleep is replaced with mdelay. This bug is found by my static analysis tool(DSAC) and checked by my code review. Signed-off-by: Jia-Ju