Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 13:21 +0200, Jiri Slaby wrote: > On 08/31/2018, 01:17 PM, Tetsuo Handa wrote: > > Also, noisy messages like > > > > pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + > > #kopen's(0)) > > > > are gone. > > fwiw, thanks to 1/4… > > Dmitry, could you note the

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 13:21 +0200, Jiri Slaby wrote: > On 08/31/2018, 01:17 PM, Tetsuo Handa wrote: > > Also, noisy messages like > > > > pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + > > #kopen's(0)) > > > > are gone. > > fwiw, thanks to 1/4… > > Dmitry, could you note the

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Jiri Slaby
On 08/31/2018, 01:17 PM, Tetsuo Handa wrote: > Also, noisy messages like > > pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + #kopen's(0)) > > are gone. fwiw, thanks to 1/4… Dmitry, could you note the message above to the commit log of 1/4, so that we know the patch fixed that and

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Jiri Slaby
On 08/31/2018, 01:17 PM, Tetsuo Handa wrote: > Also, noisy messages like > > pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + #kopen's(0)) > > are gone. fwiw, thanks to 1/4… Dmitry, could you note the message above to the commit log of 1/4, so that we know the patch fixed that and

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Tetsuo Handa
On 2018/08/31 15:51, Jiri Slaby wrote: > On 08/29/2018, 05:19 PM, Tetsuo Handa wrote: >> On 2018/08/29 11:23, Dmitry Safonov wrote: >>> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >>> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >>> But it races with anyone who

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Tetsuo Handa
On 2018/08/31 15:51, Jiri Slaby wrote: > On 08/29/2018, 05:19 PM, Tetsuo Handa wrote: >> On 2018/08/29 11:23, Dmitry Safonov wrote: >>> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >>> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >>> But it races with anyone who

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Jiri Slaby
On 08/29/2018, 05:19 PM, Tetsuo Handa wrote: > On 2018/08/29 11:23, Dmitry Safonov wrote: >> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >> But it races with anyone who expects line discipline to be the same >>

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-31 Thread Jiri Slaby
On 08/29/2018, 05:19 PM, Tetsuo Handa wrote: > On 2018/08/29 11:23, Dmitry Safonov wrote: >> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >> But it races with anyone who expects line discipline to be the same >>

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Benjamin Herrenschmidt
On Wed, 2018-08-29 at 13:34 +0900, Sergey Senozhatsky wrote: > Hi, > > Cc-ing Benjamin on this. > > On (08/29/18 03:23), Dmitry Safonov wrote: > > BUG: unable to handle kernel paging request at 2260 > > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > > Workqueue: events_unbound

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Benjamin Herrenschmidt
On Wed, 2018-08-29 at 13:34 +0900, Sergey Senozhatsky wrote: > Hi, > > Cc-ing Benjamin on this. > > On (08/29/18 03:23), Dmitry Safonov wrote: > > BUG: unable to handle kernel paging request at 2260 > > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > > Workqueue: events_unbound

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:40 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > > But it races with anyone who expects line discipline to be

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:40 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > > But it races with anyone who expects line discipline to be

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Tetsuo Handa
On 2018/08/29 11:23, Dmitry Safonov wrote: > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > But it races with anyone who expects line discipline to be the same > after hoding read semaphore in tty_ldisc_ref(). > >

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Tetsuo Handa
On 2018/08/29 11:23, Dmitry Safonov wrote: > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > But it races with anyone who expects line discipline to be the same > after hoding read semaphore in tty_ldisc_ref(). > >

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Jiri Slaby
On 08/29/2018, 04:40 PM, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: >> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >> But it races with anyone who expects line discipline to be the same >>

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Jiri Slaby
On 08/29/2018, 04:40 PM, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: >> tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() >> nor set_ldisc() nor tty_ldisc_release() as they use tty lock. >> But it races with anyone who expects line discipline to be the same >>

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Jiri Slaby
On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > But it races with anyone who expects line discipline to be the same > after hoding read semaphore in tty_ldisc_ref(). >

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Jiri Slaby
On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > tty_ldisc_reinit() doesn't race with neither tty_ldisc_hangup() > nor set_ldisc() nor tty_ldisc_release() as they use tty lock. > But it races with anyone who expects line discipline to be the same > after hoding read semaphore in tty_ldisc_ref(). >

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Dmitry Safonov
Hi Sergey, On Wed, 2018-08-29 at 13:34 +0900, Sergey Senozhatsky wrote: > Hi, > > Cc-ing Benjamin on this. Thanks! > On (08/29/18 03:23), Dmitry Safonov wrote: > > BUG: unable to handle kernel paging request at 2260 > > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > > Workqueue:

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-29 Thread Dmitry Safonov
Hi Sergey, On Wed, 2018-08-29 at 13:34 +0900, Sergey Senozhatsky wrote: > Hi, > > Cc-ing Benjamin on this. Thanks! > On (08/29/18 03:23), Dmitry Safonov wrote: > > BUG: unable to handle kernel paging request at 2260 > > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > > Workqueue:

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-28 Thread Sergey Senozhatsky
Hi, Cc-ing Benjamin on this. On (08/29/18 03:23), Dmitry Safonov wrote: > BUG: unable to handle kernel paging request at 2260 > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > Workqueue: events_unbound flush_to_ldisc > Call Trace: > [..] n_tty_receive_buf2 > [..]

Re: [PATCH 2/4] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-08-28 Thread Sergey Senozhatsky
Hi, Cc-ing Benjamin on this. On (08/29/18 03:23), Dmitry Safonov wrote: > BUG: unable to handle kernel paging request at 2260 > IP: [..] n_tty_receive_buf_common+0x5f/0x86d > Workqueue: events_unbound flush_to_ldisc > Call Trace: > [..] n_tty_receive_buf2 > [..]