lkml.org 
[lkml]   [2023]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: 8250: Clear port->pm on port specific driver unbind
* Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> [230414 07:36]:
> On Fri, 14 Apr 2023, Tony Lindgren wrote:
>
> > * Andy Shevchenko <andriy.shevchenko@linux.intel.com> [230413 16:06]:
> > > On Thu, Apr 13, 2023 at 10:03:41AM +0300, Tony Lindgren wrote:
> > > > Let's fix the issue by clearing port->pm in serial8250_unregister_port().
> > >
> > > Sounds to me like a fix that needs a Fixes tag.
> >
> > Maybe commit c161afe9759d ("8250: allow platforms to override PM hook.").
> >
> > That's a bit unclear though as the hardware specific functions were
> > available at that point as they were passed in platform data. This can
> > be seen with git blame c161afe9759d drivers/serial/8250.c. To me it seems
> > the port->pm became potentially invalid if a serial port device driver
> > started implementing PM runtime?
> >
> > Maybe just tagging it with Cc: stable is better if no obvious Fixes tag
> > can be figured out.
>
> I'd just put that c161afe9759d there. It seems quite harmless even if it
> would be unnecessary before some driver commit which is much harder to
> pinpoint (and it would likely turn out old enough to not matter anyway
> for the kernels stable cares about).

OK works for me.

I'm now wondering still if we should clear all the conditional hardware
specific functions too in addition to port->pm that get set in
serial8250_register_8250_port(). Maybe best done in a separate patch
as needed.. Any suggestions?

> I forgot to give this earlier:
>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Thanks,

Tony

\
 
 \ /
  Last update: 2023-04-14 11:41    [W:0.041 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site