Re: [PATCH] tty: limit TCSBRKP break duration
From: Greg Kroah-Hartman
Date: Mon Jul 27 2026 - 02:27:09 EST
On Mon, Jul 27, 2026 at 01:55:25PM +0800, Xincheng Wang wrote:
> An RCU stall was observed while exercising tty ioctls on an
> 8250 Pericom PCI serial port.
>
> The reproducer passed a very large argument to TCSBRKP. tty_ioctl()
> multiplies the argument by 100 and forwards it to send_break(), whose
> duration is an unsigned int. That can leave the serial break condition
> asserted for an extremely long time and keep the IRQ line active on the
> affected setup.
>
> Clamp the duration before calling send_break() so normal values keep
> their current behavior, while preventing excessively long break
> intervals.
How do we know that systems don't want those long break intervals set?
You are changing something that might break people's working systems.
What specific error are you getting when you send a long break time and
why can't your hardware handle that?
thanks,
greg k-h