[lvc-project] [PATCH 1/2] tty: n_gsm: avoid reactivation without previous cleanup

Greg Kroah-Hartman gregkh at linuxfoundation.org
Mon Jul 6 18:18:06 MSK 2026


On Mon, Jul 06, 2026 at 05:49:38PM +0300, Dmitry Antipov wrote:
> On 7/6/26 5:35 PM, Greg Kroah-Hartman wrote:
> 
> > We've had loads of syzbot "issues" reported in this code, and unless it
> > actually shows up in a real device or operation, I'd just leave it alone
> > please as there are lots of subtle issues involved in it.
> > 
> > Have you tested this in real hardware?
> 
> No. But I don't see any practical reasons doing ioctl(..., GSMIOC_SETCONF_EXT, ...)
> more than once (without GSM_FL_RESTART) without doing anything else. Worse, an
> attempt to do it simultaneously from multiple threads is obviously racy.

That's why userspace does not do this from multiple threads :)

> > Why unlikely()?  Can you measure it with/without that?  If not, it
> > should never be used.
> 
> See above. IIUC "real" userspace program which talks to the device is unlikely
> to bomb the device driver with the weird sequences of ioctl()s like syzkaller
> usually does.

Again, if you can not measure the difference with/without unlikely()
never use it as the compiler and CPU will always do the right thing
instead.

thanks,

greg k-h



More information about the lvc-project mailing list