Re: tty crash in tty_ldisc_receive_buf()

2017-04-07 Thread Benjamin Herrenschmidt
On Fri, 2017-04-07 at 09:03 -0500, Rob Herring wrote: > Is this with a serial port? There were some changes to serial_core > close in 4.9. It's a combo of serial and hvc actually. Cheers, Ben.

Re: tty crash in tty_ldisc_receive_buf()

2017-04-07 Thread Benjamin Herrenschmidt
On Fri, 2017-04-07 at 09:03 -0500, Rob Herring wrote: > Is this with a serial port? There were some changes to serial_core > close in 4.9. It's a combo of serial and hvc actually. Cheers, Ben.

Re: tty crash in tty_ldisc_receive_buf()

2017-04-07 Thread Rob Herring
On Thu, Apr 6, 2017 at 8:03 PM, Benjamin Herrenschmidt wrote: > On Thu, 2017-04-06 at 08:28 -0500, Rob Herring wrote: >> >> Can you try this one [1]. >> >> Rob >> >> [1] https://lkml.org/lkml/2017/3/23/569 > > Unless I missed something, that patch doesn't change barriers

Re: tty crash in tty_ldisc_receive_buf()

2017-04-07 Thread Rob Herring
On Thu, Apr 6, 2017 at 8:03 PM, Benjamin Herrenschmidt wrote: > On Thu, 2017-04-06 at 08:28 -0500, Rob Herring wrote: >> >> Can you try this one [1]. >> >> Rob >> >> [1] https://lkml.org/lkml/2017/3/23/569 > > Unless I missed something, that patch doesn't change barriers or > locking, so I don't

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
> > + /* This probably shouldn't happen, but return 0 data processed */ > > + if (!ldata) > > + return 0; > > + > >   while (1) { > >   /* > >    * When PARMRK is set, each input char may take up to 3 > > chars > > Maybe your patch should looks like: > +

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
> > + /* This probably shouldn't happen, but return 0 data processed */ > > + if (!ldata) > > + return 0; > > + > >   while (1) { > >   /* > >    * When PARMRK is set, each input char may take up to 3 > > chars > > Maybe your patch should looks like: > +

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Wang YanQing
On Thu, Apr 06, 2017 at 05:04:41PM +1000, Michael Neuling wrote: > Hi all, > > We are seeing the following crash (in linux-next but has been around since at > least v4.10). > > [  417.514499] Unable to handle kernel paging request for data at address > 0x2260 > [  417.515361] Faulting

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Wang YanQing
On Thu, Apr 06, 2017 at 05:04:41PM +1000, Michael Neuling wrote: > Hi all, > > We are seeing the following crash (in linux-next but has been around since at > least v4.10). > > [  417.514499] Unable to handle kernel paging request for data at address > 0x2260 > [  417.515361] Faulting

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 08:28 -0500, Rob Herring wrote: > > Can you try this one [1]. > > Rob > > [1] https://lkml.org/lkml/2017/3/23/569 Unless I missed something, that patch doesn't change barriers or locking, so I don't see how it could fix anything ... Mind you we haven't quite figured out

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 08:28 -0500, Rob Herring wrote: > > Can you try this one [1]. > > Rob > > [1] https://lkml.org/lkml/2017/3/23/569 Unless I missed something, that patch doesn't change barriers or locking, so I don't see how it could fix anything ... Mind you we haven't quite figured out

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
> > If anyone has an idea, I'm happy to try a patch. > > Can you try this one [1]. Rob, I'm still hitting it when I apply that on next-20170405. Crash below.. Any other clues? [  229.422825] Unable to handle kernel paging request for data at address 0x2260 [  229.423681] Faulting

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
> > If anyone has an idea, I'm happy to try a patch. > > Can you try this one [1]. Rob, I'm still hitting it when I apply that on next-20170405. Crash below.. Any other clues? [  229.422825] Unable to handle kernel paging request for data at address 0x2260 [  229.423681] Faulting

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Rob Herring
On Thu, Apr 6, 2017 at 2:04 AM, Michael Neuling wrote: > Hi all, > > We are seeing the following crash (in linux-next but has been around since at > least v4.10). > > [ 417.514499] Unable to handle kernel paging request for data at address > 0x2260 > [ 417.515361]

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Rob Herring
On Thu, Apr 6, 2017 at 2:04 AM, Michael Neuling wrote: > Hi all, > > We are seeing the following crash (in linux-next but has been around since at > least v4.10). > > [ 417.514499] Unable to handle kernel paging request for data at address > 0x2260 > [ 417.515361] Faulting instruction

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 17:04 +1000, Michael Neuling wrote: > We see this usually on boot but can also see it if we kill a getty attached to > tty (which is then respawned by systemd).  It seems like we are flushing data > to > a tty at the same time as it's being torn down and restarted. > > I

Re: tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Benjamin Herrenschmidt
On Thu, 2017-04-06 at 17:04 +1000, Michael Neuling wrote: > We see this usually on boot but can also see it if we kill a getty attached to > tty (which is then respawned by systemd).  It seems like we are flushing data > to > a tty at the same time as it's being torn down and restarted. > > I

tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
Hi all, We are seeing the following crash (in linux-next but has been around since at least v4.10). [  417.514499] Unable to handle kernel paging request for data at address 0x2260 [  417.515361] Faulting instruction address: 0xc06fad80 cpu 0x15: Vector: 300 (Data Access) at

tty crash in tty_ldisc_receive_buf()

2017-04-06 Thread Michael Neuling
Hi all, We are seeing the following crash (in linux-next but has been around since at least v4.10). [  417.514499] Unable to handle kernel paging request for data at address 0x2260 [  417.515361] Faulting instruction address: 0xc06fad80 cpu 0x15: Vector: 300 (Data Access) at