On Thu, Apr 28, 2022 at 08:11:56PM +0300, Ilpo Järvinen wrote: > uart_throttle() assumes that a driver provides a throttle function in > uart_ops. But not all drivers do and there seems to nothing in > serial_core that would set it either. Thus, check it before calling. > > Reported-by: Nuno Gonçalves <nunojpg@xxxxxxxxx> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> > > --- > drivers/tty/serial/serial_core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c > index 6a8963caf954..18c9d46e0b85 100644 > --- a/drivers/tty/serial/serial_core.c > +++ b/drivers/tty/serial/serial_core.c > @@ -697,7 +697,8 @@ static void uart_throttle(struct tty_struct *tty) > mask |= UPSTAT_AUTORTS; > > if (port->status & mask) { > - port->ops->throttle(port); > + if (port->ops->throttle) > + port->ops->throttle(port); > mask &= ~port->status; > } > > What commit id does this "fix"? thanks, greg k-h