Re: [External] Re: [PATCH] serial: 8250: fix panic due to PSLVERR

From: Andy Shevchenko
Date: Fri Apr 04 2025 - 06:59:15 EST


On Fri, Apr 04, 2025 at 10:44:09AM +0800, yunhui cui wrote:
> On Thu, Apr 3, 2025 at 7:36 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Thu, Apr 03, 2025 at 05:03:36PM +0800, Yunhui Cui wrote:

...

> > > To resolve this issue, relevant serial_port_out operations should be
> >
> > serial_port_out()
>
> Okay.
>
> >
> > > placed in a critical section, and UART_RX data should only be read
> > > when the UART_LSR DR bit is set.
> >
> > The last one is made in the common code, are you sure that all supported UARTs
> > will be okay with such a change?
>
> This change enhances code robustness without being intrusive.

It is intrusive as it touches the core part affecting basically
_all_ of the 8250-based drivers.

Yes, it's small, but still it needs to be done carefully with commit message
pointing out to the other 8250 datasheets to show that this is _not_ DW
specific change.

...

> > > Panic message:
> >
> > Please, read this
> > https://www.kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages
> > and act accordingly.
>
> Okay, I'll update the next version to follow the guideline: 'Avoid
> directly copying full dmesg output (e.g., timestamps, registers, and
> stack dumps); instead, extract the critical call chain.'

and make it short, e.g. ~3-5 lines only.

--
With Best Regards,
Andy Shevchenko