Re: [PATCH v2] tty: hvc: Fix data abort due to race in hvc_open

2020-05-20 Thread rananta
On 2020-05-20 01:59, Jiri Slaby wrote: On 20. 05. 20, 8:47, Raghavendra Rao Ananta wrote: Potentially, hvc_open() can be called in parallel when two tasks calls open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() callback in the function fails, where it sets the tty->driver

Re: [PATCH v2] tty: hvc: Fix data abort due to race in hvc_open

2020-05-20 Thread Jiri Slaby
On 20. 05. 20, 8:47, Raghavendra Rao Ananta wrote: > Potentially, hvc_open() can be called in parallel when two tasks calls > open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() > callback in the function fails, where it sets the tty->driver_data to > NULL, the parallel hvc_open

[PATCH v2] tty: hvc: Fix data abort due to race in hvc_open

2020-05-19 Thread Raghavendra Rao Ananta
Potentially, hvc_open() can be called in parallel when two tasks calls open() on /dev/hvcX. In such a scenario, if the hp->ops->notifier_add() callback in the function fails, where it sets the tty->driver_data to NULL, the parallel hvc_open() can see this NULL and cause a memory abort. Hence, do a