Re: [PATCH] tty: limit TCSBRKP break duration
Xincheng Wang <[email protected]> Wed, 29 Jul 2026 19:19:27 +0800
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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