[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1537279969.21380.3.camel@arista.com>
Date: Tue, 18 Sep 2018 15:12:49 +0100
From: Dmitry Safonov <dima@...sta.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Dmitry Safonov <0x7f454c46@...il.com>,
Daniel Axtens <dja@...ens.net>,
Dmitry Vyukov <dvyukov@...gle.com>,
Mark Rutland <mark.rutland@....com>,
Michael Neuling <mikey@...ling.org>,
Mikulas Patocka <mpatocka@...hat.com>,
Nathan March <nathan@...net>,
Pasi Kärkkäinen <pasik@....fi>,
Peter Hurley <peter@...leysoftware.com>,
"Rong, Chen" <rong.a.chen@...el.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Tan Xiaojun <tanxiaojun@...wei.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Jiri Slaby <jslaby@...e.com>
Subject: Re: [PATCHv5 2/7] tty/ldsem: Wake up readers after timed out
down_write()
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 woken up,
> > otherwise they may miss a chance to acquire the semaphore until the
> > last
> > active reader will do ldsem_up_read().
> >
> > There was a couple of reports where there was one active reader and
> > other readers soft locked up:
> > Showing all locks held in the system:
> > 2 locks held by khungtaskd/17:
> > #0: (rcu_read_lock){......}, at: watchdog+0x124/0x6d1
> > #1: (tasklist_lock){.+.+..}, at:
> > debug_show_all_locks+0x72/0x2d3
> > 2 locks held by askfirst/123:
> > #0: (&tty->ldisc_sem){.+.+.+}, at: ldsem_down_read+0x46/0x58
> > #1: (&ldata->atomic_read_lock){+.+...}, at:
> > n_tty_read+0x115/0xbe4
> >
> > Prevent readers wait for active readers to release ldisc semaphore.
> >
> > Link: lkml.kernel.org/r/<20171121132855.ajdv4k6swzhvktl6@...-t540p.
> > sh.intel.com>
> > Link: lkml.kernel.org/r/<20180907045041.GF1110@...o2-debian>
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Cc: Jiri Slaby <jslaby@...e.com>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Reported-by: kernel test robot <rong.a.chen@...el.com>
> > Signed-off-by: Dmitry Safonov <dima@...sta.com>
> > ---
>
> Why isn't this ok for the stable trees?
I guess it is ok for stables, but I would prefer to have an ack from
Peter before that.
Peter, could you look if my analysis and fix are proper?
I'll fill more confident about it going to stables if it had your ack.
--
Thanks,
Dmitry
Powered by blists - more mailing lists