Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_timer_func() that calls lpuart_copy_rx_to_tty() that acquires same lock. T

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:25 PM, Nikita Yushchenko wrote: 03.12.2016 10:06, Bhuvanchandra DV пишет: On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while holding sport->port.lock - sport->lpuart_timer

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Nikita Yushchenko
03.12.2016 10:06, Bhuvanchandra DV пишет: > On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: > Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_time

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-02 Thread Nikita Yushchenko
>> Problem found via lockdep: >> >> - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while >> holding sport->port.lock >> >> - sport->lpuart_timer routine is lpuart_timer_func() that calls >> lpuart_copy_rx_to_tty() that acquires same lock. >> >> To fix, move Rx DMA stopping ou

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-02 Thread Stefan Agner
On 2016-12-02 02:28, Nikita Yushchenko wrote: > Problem found via lockdep: > > - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while > holding sport->port.lock > > - sport->lpuart_timer routine is lpuart_timer_func() that calls > lpuart_copy_rx_to_tty() that acquires same lo

[PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-02 Thread Nikita Yushchenko
Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(&sport->lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_timer_func() that calls lpuart_copy_rx_to_tty() that acquires same lock. To fix, move Rx DMA stopping out of lock, as it already