Re: [PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-19 Thread Dmitry Safonov
On Wed, 2018-09-19 at 13:35 -0400, Mikulas Patocka wrote: > > On Wed, 19 Sep 2018, Mikulas Patocka wrote: > > > > > > > On Tue, 18 Sep 2018, Dmitry Safonov wrote: > > > > > Hi all, > > > > > > Three fixes that worth to have

Re: [PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-19 Thread Dmitry Safonov
On Wed, 2018-09-19 at 13:35 -0400, Mikulas Patocka wrote: > > On Wed, 19 Sep 2018, Mikulas Patocka wrote: > > > > > > > On Tue, 18 Sep 2018, Dmitry Safonov wrote: > > > > > Hi all, > > > > > > Three fixes that worth to have

Re: [PATCHv5 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:49 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:57AM +0100, Dmitry Safonov wrote: > > Make sure under CONFIG_LOCKDEP that each change to line discipline > > is done with held write semaphor. > > Otherwise potential reader

Re: [PATCHv5 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:49 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:57AM +0100, Dmitry Safonov wrote: > > Make sure under CONFIG_LOCKDEP that each change to line discipline > > is done with held write semaphor. > > Otherwise potential reader

Re: [PATCHv5 3/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:47 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:54AM +0100, 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

Re: [PATCHv5 3/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:47 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:54AM +0100, 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

Re: [PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:41 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:52AM +0100, Dmitry Safonov wrote: > > In case of tty_ldisc_reinit() failure, tty->count should be > > decremented > > back, otherwise we will never release_tty(). > > Tetsu

Re: [PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-18 Thread Dmitry Safonov
On Tue, 2018-09-18 at 15:41 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:52AM +0100, Dmitry Safonov wrote: > > In case of tty_ldisc_reinit() failure, tty->count should be > > decremented > > back, otherwise we will never release_tty(). > > Tetsu

Re: [PATCHv5 2/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-18 Thread Dmitry Safonov
Hi Greg, On Tue, 2018-09-18 at 15:43 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:53AM +0100, Dmitry Safonov wrote: > > ldsem_down_read() will sleep if there is pending writer in the > > queue. > > If the writer times out, readers in the queue should be wo

Re: [PATCHv5 2/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-18 Thread Dmitry Safonov
Hi Greg, On Tue, 2018-09-18 at 15:43 +0200, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 12:52:53AM +0100, Dmitry Safonov wrote: > > ldsem_down_read() will sleep if there is pending writer in the > > queue. > > If the writer times out, readers in the queue should be wo

[PATCHv5 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-17 Thread Dmitry Safonov
nce to slave pty yet. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..bc0171f984a1 100644 --- a

[PATCHv5 4/7] tty: Simplify tty->count math in tty_reopen()

2018-09-17 Thread Dmitry Safonov
Tested-by: Mark Rutland Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3ef8b977b167..44bf22b8d746 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tt

[PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-17 Thread Dmitry Safonov
(please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty/ldsem: Wake up readers after timed out down_write() tty: Hold tty_ldisc_lock() during tty_reopen() tty: Simplify tty->count math in tty_reopen() tty/ldsem: Add lockdep asserts

[PATCHv5 3/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-17 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/tty/

[PATCHv5 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-17 Thread Dmitry Safonov
(please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty/ldsem: Wake up readers after timed out down_write() tty: Hold tty_ldisc_lock() during tty_reopen() tty: Simplify tty->count math in tty_reopen() tty/ldsem: Add lockdep asserts

[PATCHv5 3/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-17 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/tty/

[PATCHv5 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-17 Thread Dmitry Safonov
nce to slave pty yet. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..bc0171f984a1 100644 --- a

[PATCHv5 4/7] tty: Simplify tty->count math in tty_reopen()

2018-09-17 Thread Dmitry Safonov
Tested-by: Mark Rutland Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3ef8b977b167..44bf22b8d746 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tt

[PATCHv5 5/7] tty/ldsem: Convert to regular lockdep annotations

2018-09-17 Thread Dmitry Safonov
From: Peter Zijlstra For some reason ldsem has its own lockdep wrappers, make them go away. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 51 ++--- 1 file changed, 14 insertions(+), 37 deletions

[PATCHv5 7/7] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-17 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv5 7/7] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-17 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv5 5/7] tty/ldsem: Convert to regular lockdep annotations

2018-09-17 Thread Dmitry Safonov
From: Peter Zijlstra For some reason ldsem has its own lockdep wrappers, make them go away. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 51 ++--- 1 file changed, 14 insertions(+), 37 deletions

[PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-17 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1

[PATCHv5 2/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-17 Thread Dmitry Safonov
;20180907045041.GF1110@shao2-debian> Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty

[PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-17 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1

[PATCHv5 2/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-17 Thread Dmitry Safonov
;20180907045041.GF1110@shao2-debian> Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty

Re: [LKP] [tty] f26eb68a52: INFO:task_blocked_for_more_than#seconds

2018-09-14 Thread Dmitry Safonov
On Fri, 2018-09-14 at 17:01 +0800, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-4.9): Thanks, [..] > [ 245.080051] INFO: task lkp-setup-rootf:500 blocked for more than > 120 seconds. > [ 245.082850] Tainted: GW T 4.19.0-rc3-00014- >

Re: [LKP] [tty] f26eb68a52: INFO:task_blocked_for_more_than#seconds

2018-09-14 Thread Dmitry Safonov
On Fri, 2018-09-14 at 17:01 +0800, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-4.9): Thanks, [..] > [ 245.080051] INFO: task lkp-setup-rootf:500 blocked for more than > 120 seconds. > [ 245.082850] Tainted: GW T 4.19.0-rc3-00014- >

[PATCHv4 2/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-11 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/

[PATCHv4 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-11 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1

[PATCHv4 3/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-11 Thread Dmitry Safonov
kernel.org/r/<20180907045041.GF1110@shao2-debian> Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/tty/tty_ldsem.c b/drive

[PATCHv4 2/7] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-11 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/

[PATCHv4 1/7] tty: Drop tty->count on tty_reopen() failure

2018-09-11 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Mark Rutland Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1

[PATCHv4 3/7] tty/ldsem: Wake up readers after timed out down_write()

2018-09-11 Thread Dmitry Safonov
kernel.org/r/<20180907045041.GF1110@shao2-debian> Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/tty/tty_ldsem.c b/drive

[PATCHv4 4/7] tty: Simplify tty->count math in tty_reopen()

2018-09-11 Thread Dmitry Safonov
Tested-by: Mark Rutland Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a947719b4626..7f968ac14bbd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tt

[PATCHv4 7/7] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv4 5/7] tty/ldsem: Convert to regular lockdep annotations

2018-09-11 Thread Dmitry Safonov
From: Peter Zijlstra For some reason ldsem has its own lockdep wrappers, make them go away. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 51 ++--- 1 file changed, 14 insertions(+), 37 deletions

[PATCHv4 5/7] tty/ldsem: Convert to regular lockdep annotations

2018-09-11 Thread Dmitry Safonov
From: Peter Zijlstra For some reason ldsem has its own lockdep wrappers, make them go away. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 51 ++--- 1 file changed, 14 insertions(+), 37 deletions

[PATCHv4 4/7] tty: Simplify tty->count math in tty_reopen()

2018-09-11 Thread Dmitry Safonov
Tested-by: Mark Rutland Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a947719b4626..7f968ac14bbd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tt

[PATCHv4 7/7] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv4 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-11 Thread Dmitry Safonov
nce to slave pty yet. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..bc0171f984a1 100644 --- a

[PATCHv4 6/7] tty/ldsem: Add lockdep asserts for ldisc_sem

2018-09-11 Thread Dmitry Safonov
nce to slave pty yet. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Peter Zijlstra Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..bc0171f984a1 100644 --- a

[PATCHv4 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-11 Thread Dmitry Safonov
ojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty: Hold tty_ldisc_lock() during tty_reopen() tty/ldsem: Wake up readers after timed out down_write() tty: Simplify tty->count math in tty_reop

[PATCHv4 0/7] tty: Hold write ldisc sem in tty_reopen()

2018-09-11 Thread Dmitry Safonov
ojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty: Hold tty_ldisc_lock() during tty_reopen() tty/ldsem: Wake up readers after timed out down_write() tty: Simplify tty->count math in tty_reop

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 15:50 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:33:22PM +0100, Dmitry Safonov wrote: > > > > You might want to think about ditching that ldsem thing > > > > entirely, > > > > and use a regular rwsem ? > > >

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 15:50 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:33:22PM +0100, Dmitry Safonov wrote: > > > > You might want to think about ditching that ldsem thing > > > > entirely, > > > > and use a regular rwsem ? > > >

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:01 +0100, Dmitry Safonov wrote: > On Tue, 2018-09-11 at 14:02 +0200, Peter Zijlstra wrote: > > On Tue, Sep 11, 2018 at 02:48:21AM +0100, Dmitry Safonov wrote: > > > It seems like when ldsem_down_read() fails with timeout, it > > > misses > &g

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:01 +0100, Dmitry Safonov wrote: > On Tue, 2018-09-11 at 14:02 +0200, Peter Zijlstra wrote: > > On Tue, Sep 11, 2018 at 02:48:21AM +0100, Dmitry Safonov wrote: > > > It seems like when ldsem_down_read() fails with timeout, it > > > misses > &g

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:02 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:21AM +0100, Dmitry Safonov wrote: > > It seems like when ldsem_down_read() fails with timeout, it misses > > update for sem->wait_readers. By that reason, when writer finally >

Re: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:02 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:21AM +0100, Dmitry Safonov wrote: > > It seems like when ldsem_down_read() fails with timeout, it misses > > update for sem->wait_readers. By that reason, when writer finally >

Re: [PATCHv3 4/6] tty/lockdep: Add ldisc_sem asserts

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:01 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:19AM +0100, Dmitry Safonov wrote: > > Make sure under CONFIG_LOCKDEP that each change to line discipline > > is done with held write semaphor. > > But you don't do that. You j

Re: [PATCHv3 4/6] tty/lockdep: Add ldisc_sem asserts

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 14:01 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:19AM +0100, Dmitry Safonov wrote: > > Make sure under CONFIG_LOCKDEP that each change to line discipline > > is done with held write semaphor. > > But you don't do that. You j

Re: [PATCHv3 2/6] tty/ldsem: Update waiter->task before waking up reader

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 13:40 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:17AM +0100, Dmitry Safonov wrote: > > There is a couple of reports about lockup in ldsem_down_read() > > without > > anyone holding write end of ldisc semaphore: > > lkml.k

Re: [PATCHv3 2/6] tty/ldsem: Update waiter->task before waking up reader

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 13:40 +0200, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 02:48:17AM +0100, Dmitry Safonov wrote: > > There is a couple of reports about lockup in ldsem_down_read() > > without > > anyone holding write end of ldisc semaphore: > > lkml.k

Re: [PATCHv3 0/6] tty: Hold write ldisc sem in tty_reopen()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 13:16 +0100, Mark Rutland wrote: > On Tue, Sep 11, 2018 at 02:48:15AM +0100, Dmitry Safonov wrote: > > Hi all, > > Hi, > > > Three fixes that worth to have in the @stable, as we've hit them on > > v4.9 > > stable. > > >

Re: [PATCHv3 0/6] tty: Hold write ldisc sem in tty_reopen()

2018-09-11 Thread Dmitry Safonov
On Tue, 2018-09-11 at 13:16 +0100, Mark Rutland wrote: > On Tue, Sep 11, 2018 at 02:48:15AM +0100, Dmitry Safonov wrote: > > Hi all, > > Hi, > > > Three fixes that worth to have in the @stable, as we've hit them on > > v4.9 > > stable. > > >

[PATCHv3 5/6] tty: Simplify tty->count math in tty_reopen()

2018-09-10 Thread Dmitry Safonov
ed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a947719b4626..7f968ac14bbd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1268,17 +1268,13 @@

[PATCHv3 4/6] tty/lockdep: Add ldisc_sem asserts

2018-09-10 Thread Dmitry Safonov
() for the tty->link. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..202cb645582f 100644 --- a/drivers/tty/tty_ldisc.c ++

[PATCHv3 1/6] tty: Drop tty->count on tty_reopen() failure

2018-09-10 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1 file changed, 8 insertions

[PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-10 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv3 5/6] tty: Simplify tty->count math in tty_reopen()

2018-09-10 Thread Dmitry Safonov
ed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a947719b4626..7f968ac14bbd 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1268,17 +1268,13 @@

[PATCHv3 4/6] tty/lockdep: Add ldisc_sem asserts

2018-09-10 Thread Dmitry Safonov
() for the tty->link. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..202cb645582f 100644 --- a/drivers/tty/tty_ldisc.c ++

[PATCHv3 1/6] tty: Drop tty->count on tty_reopen() failure

2018-09-10 Thread Dmitry Safonov
("tty: Destroy ldisc instance on hangup") Cc: sta...@vger.kernel.org # v4.6+ Cc: Greg Kroah-Hartman Cc: Jiri Slaby Reviewed-by: Jiri Slaby Tested-by: Jiri Slaby Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1 file changed, 8 insertions

[PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()

2018-09-10 Thread Dmitry Safonov
fferent than MAX_SCHEDULE_TIMEOUT, so it might be worth to delete timeout parameter and error path fall-back.. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/tty_ldsem.c b

[PATCHv3 2/6] tty/ldsem: Update waiter->task before waking up reader

2018-09-10 Thread Dmitry Safonov
Cc: Jiri Slaby Cc: Peter Zijlstra Cc: "Paul E. McKenney" Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index 0c98d

[PATCHv3 3/6] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-10 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tt

[PATCHv3 0/6] tty: Hold write ldisc sem in tty_reopen()

2018-09-10 Thread Dmitry Safonov
enozhatsky Cc: Tan Xiaojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty/ldsem: Update waiter->task before waking up reader tty: Hold tty_ldisc_lock() during tty_reopen() tty/lockdep: Add ldisc_sem as

[PATCHv3 2/6] tty/ldsem: Update waiter->task before waking up reader

2018-09-10 Thread Dmitry Safonov
Cc: Jiri Slaby Cc: Peter Zijlstra Cc: "Paul E. McKenney" Reported-by: kernel test robot Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldsem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index 0c98d

[PATCHv3 3/6] tty: Hold tty_ldisc_lock() during tty_reopen()

2018-09-10 Thread Dmitry Safonov
Jiri Slaby Reviewed-by: Jiri Slaby Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tt

[PATCHv3 0/6] tty: Hold write ldisc sem in tty_reopen()

2018-09-10 Thread Dmitry Safonov
enozhatsky Cc: Tan Xiaojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (6): tty: Drop tty->count on tty_reopen() failure tty/ldsem: Update waiter->task before waking up reader tty: Hold tty_ldisc_lock() during tty_reopen() tty/lockdep: Add ldisc_sem as

Re: [LKP] [tty] 0b4f83d510: INFO:task_blocked_for_more_than#seconds

2018-09-10 Thread Dmitry Safonov
Hi Sergey, Jiri, On Mon, 2018-09-10 at 14:14 +0900, Sergey Senozhatsky wrote: > On (09/07/18 08:39), Jiri Slaby wrote: > > > [ 244.944070] > > > [ 244.944070] Showing all locks held in the system: > > > [ 244.945558] 1 lock held by khungtaskd/18: > > > [ 244.946495] #0: (ptrval)

Re: [LKP] [tty] 0b4f83d510: INFO:task_blocked_for_more_than#seconds

2018-09-10 Thread Dmitry Safonov
Hi Sergey, Jiri, On Mon, 2018-09-10 at 14:14 +0900, Sergey Senozhatsky wrote: > On (09/07/18 08:39), Jiri Slaby wrote: > > > [ 244.944070] > > > [ 244.944070] Showing all locks held in the system: > > > [ 244.945558] 1 lock held by khungtaskd/18: > > > [ 244.946495] #0: (ptrval)

Re: [LKP] [tty] 0b4f83d510: INFO:task_blocked_for_more_than#seconds

2018-09-07 Thread Dmitry Safonov
() during tty_reopen()") > > url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/tty-Ho > > ld-write-ldisc-sem-in-tty_reopen/20180829-165618 > > base: https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git > > tty-testing > > > > in te

Re: [LKP] [tty] 0b4f83d510: INFO:task_blocked_for_more_than#seconds

2018-09-07 Thread Dmitry Safonov
() during tty_reopen()") > > url: https://github.com/0day-ci/linux/commits/Dmitry-Safonov/tty-Ho > > ld-write-ldisc-sem-in-tty_reopen/20180829-165618 > > base: https://git.kernel.org/cgit/linux/kernel/git/gregkh/tty.git > > tty-testing > > > > in te

[PATCHv2 0/4] tty: Hold write ldisc sem in tty_reopen()

2018-09-03 Thread Dmitry Safonov
ta.com> Huuge cc list: Cc: Daniel Axtens Cc: Dmitry Vyukov Cc: Michael Neuling Cc: Mikulas Patocka Cc: Nathan March Cc: Pasi Kärkkäinen Cc: Peter Hurley Cc: Sergey Senozhatsky Cc: Tan Xiaojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (4): tty: Drop t

[PATCHv2 0/4] tty: Hold write ldisc sem in tty_reopen()

2018-09-03 Thread Dmitry Safonov
ta.com> Huuge cc list: Cc: Daniel Axtens Cc: Dmitry Vyukov Cc: Michael Neuling Cc: Mikulas Patocka Cc: Nathan March Cc: Pasi Kärkkäinen Cc: Peter Hurley Cc: Sergey Senozhatsky Cc: Tan Xiaojun Cc: Tetsuo Handa (please, ignore if I Cc'ed you mistakenly) Dmitry Safonov (4): tty: Drop t

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

2018-09-03 Thread Dmitry Safonov
flush of buf") Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 5e

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

2018-09-03 Thread Dmitry Safonov
flush of buf") Reported-by: syzbot+3aa9784721dfb90e9...@syzkaller.appspotmail.com Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 5e

[PATCHv2 3/4] tty/lockdep: Add ldisc_sem asserts

2018-09-03 Thread Dmitry Safonov
() for the tty->link. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..202cb645582f 100644 --- a/drivers/tty/tty_ldisc.c ++

[PATCHv2 3/4] tty/lockdep: Add ldisc_sem asserts

2018-09-03 Thread Dmitry Safonov
() for the tty->link. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Dmitry Safonov --- drivers/tty/tty_ldisc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index fc4c97cae01e..202cb645582f 100644 --- a/drivers/tty/tty_ldisc.c ++

[PATCHv2 1/4] tty: Drop tty->count on tty_reopen() failure

2018-09-03 Thread Dmitry Safonov
Slaby Cc: sta...@vger.kernel.org # v4.6+ Fixes: commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup") Tested-by: Jiri Slaby Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --g

[PATCHv2 4/4] tty: Simplify tty->count math in tty_reopen()

2018-09-03 Thread Dmitry Safonov
As noted by Jiri, tty_ldisc_reinit() shouldn't rely on tty counter. Simplify math by increasing the counter after reinit success. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Link: lkml.kernel.org/r/<20180829022353.23568-2-d...@arista.com> Suggested-by: Jiri Slaby Signed-off-by: Dmitry S

[PATCHv2 1/4] tty: Drop tty->count on tty_reopen() failure

2018-09-03 Thread Dmitry Safonov
Slaby Cc: sta...@vger.kernel.org # v4.6+ Fixes: commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup") Tested-by: Jiri Slaby Tested-by: Tetsuo Handa Signed-off-by: Dmitry Safonov --- drivers/tty/tty_io.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --g

[PATCHv2 4/4] tty: Simplify tty->count math in tty_reopen()

2018-09-03 Thread Dmitry Safonov
As noted by Jiri, tty_ldisc_reinit() shouldn't rely on tty counter. Simplify math by increasing the counter after reinit success. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Link: lkml.kernel.org/r/<20180829022353.23568-2-d...@arista.com> Suggested-by: Jiri Slaby Signed-off-by: Dmitry S

Re: [PATCH 3/4] tty: Lock tty pair in tty_init_dev()

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 08:54 +0200, Jiri Slaby wrote: > On 08/29/2018, 06:28 PM, Dmitry Safonov wrote: > > On Wed, 2018-08-29 at 16:46 +0200, Jiri Slaby wrote: > > > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > > > It's safe to not lock both here - done to s

Re: [PATCH 3/4] tty: Lock tty pair in tty_init_dev()

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 08:54 +0200, Jiri Slaby wrote: > On 08/29/2018, 06:28 PM, Dmitry Safonov wrote: > > On Wed, 2018-08-29 at 16:46 +0200, Jiri Slaby wrote: > > > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > > > It's safe to not lock both here - done to s

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 1/4] tty: Drop tty->count on tty_reopen() failure

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 08:47 +0200, Jiri Slaby wrote: > On 08/29/2018, 06:13 PM, Dmitry Safonov wrote: > > > I would just do: > > > if (!retval) > > > tty->count++; > > > here. Nobody from ldiscs should rely on tty->count. > > > >

Re: [PATCH 1/4] tty: Drop tty->count on tty_reopen() failure

2018-08-31 Thread Dmitry Safonov
On Fri, 2018-08-31 at 08:47 +0200, Jiri Slaby wrote: > On 08/29/2018, 06:13 PM, Dmitry Safonov wrote: > > > I would just do: > > > if (!retval) > > > tty->count++; > > > here. Nobody from ldiscs should rely on tty->count. > > > >

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
On Thu, 2018-08-30 at 23:57 +0100, Dmitry Safonov wrote: > Hi Igor, > > On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > > BUG_ON() is unlikely() to BUG() > > This selftest runs in userspace.. > So, we should define the macro somehow, as i.e: > rseq/rse

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
On Thu, 2018-08-30 at 23:57 +0100, Dmitry Safonov wrote: > Hi Igor, > > On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > > BUG_ON() is unlikely() to BUG() > > This selftest runs in userspace.. > So, we should define the macro somehow, as i.e: > rseq/rse

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
Hi Igor, On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > BUG_ON() is unlikely() to BUG() This selftest runs in userspace.. So, we should define the macro somehow, as i.e: rseq/rseq.h:#define rseq_unlikely(x)__builtin_expect(!!(x), 0) Otherwise, [selftests]$ make vm/map_populate cc

Re: [PATCH 05/23] selftest: vm: add unlikely() to BUG_ON()

2018-08-30 Thread Dmitry Safonov
Hi Igor, On Fri, 2018-08-31 at 01:34 +0300, Igor Stoppa wrote: > BUG_ON() is unlikely() to BUG() This selftest runs in userspace.. So, we should define the macro somehow, as i.e: rseq/rseq.h:#define rseq_unlikely(x)__builtin_expect(!!(x), 0) Otherwise, [selftests]$ make vm/map_populate cc

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 ex

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 ex

Re: [PATCH 3/4] tty: Lock tty pair in tty_init_dev()

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:46 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > It's safe to not lock both here - done to silence attempt lockdep > > assert in > > tty_ldisc_open(), which will be added with following patch. > > SOrry, could

Re: [PATCH 3/4] tty: Lock tty pair in tty_init_dev()

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:46 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > It's safe to not lock both here - done to silence attempt lockdep > > assert in > > tty_ldisc_open(), which will be added with following patch. > > SOrry, could

Re: [PATCH 1/4] tty: Drop tty->count on tty_reopen() failure

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:38 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > In case of tty_ldisc_reinit() failure, tty->count should be > > decremented > > back, otherwise we will never release_tty(). > > Never seen it in the real life

Re: [PATCH 1/4] tty: Drop tty->count on tty_reopen() failure

2018-08-29 Thread Dmitry Safonov
On Wed, 2018-08-29 at 16:38 +0200, Jiri Slaby wrote: > On 08/29/2018, 04:23 AM, Dmitry Safonov wrote: > > In case of tty_ldisc_reinit() failure, tty->count should be > > decremented > > back, otherwise we will never release_tty(). > > Never seen it in the real life

<    1   2   3   4   5   6   7   8   9   10   >