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
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
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
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
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
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
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
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
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
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
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
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
(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
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/
(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
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/
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
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
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
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
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
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
("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
;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
("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
;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
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-
>
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-
>
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/
("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
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
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/
("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
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
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
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
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
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
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
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
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
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
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
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
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 ?
> > >
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 ?
> > >
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
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
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
>
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
>
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
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
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
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
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.
> >
>
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.
> >
>
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 @@
() 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
++
("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
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
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 @@
() 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
++
("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
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
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
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
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
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
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
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
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)
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)
() 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
() 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
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
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
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
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
() 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
++
() 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
++
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
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
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
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
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
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
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
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
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.
> >
> >
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.
> >
> >
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
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
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
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
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
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
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
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
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
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
501 - 600 of 1582 matches
Mail list logo