Re: [PATCH] tty: limit TCSBRKP break duration
From: Xincheng Wang
Date: Wed Jul 29 2026 - 07:27:23 EST
Hi Greg,
Thanks for the review.
You are right. The RCU stall I observed does not by itself justify
clamping long break intervals in the tty core, so I will drop that
patch.
While looking at this path, I noticed that tty_ioctl() multiplies the
TCSBRKP argument by 100 and passes the result to send_break(), whose
duration argument is unsigned int. Values whose product exceeds UINT_MAX
are silently truncated to an unintended duration.
Do you think it is worth fixing that separately by rejecting TCSBRKP
values that cannot fit in the unsigned-int millisecond duration used by
send_break()?
Thanks,
Xincheng