From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org, lvc-project@linuxtesting.org,
syzbot+b5d1f455d385b2c7da3c@syzkaller.appspotmail.com
Subject: Re: [PATCH 1/2] tty: n_gsm: avoid reactivation without previous cleanup
Date: Mon, 6 Jul 2026 17:18:06 +0200 [thread overview]
Message-ID: <2026070616-handsaw-careless-c428@gregkh> (raw)
In-Reply-To: <16b08a3e-4b31-4941-a0aa-0b53a0dc4cec@yandex.ru>
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
next prev parent reply other threads:[~2026-07-06 15:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 14:20 [PATCH 1/2] tty: n_gsm: avoid reactivation without previous cleanup Dmitry Antipov
2026-07-06 14:20 ` [PATCH 2/2] tty: n_gsm: issue mutex_destroy() from gsm_dlci_free() Dmitry Antipov
2026-07-07 3:24 ` Jiri Slaby
2026-07-06 14:35 ` [PATCH 1/2] tty: n_gsm: avoid reactivation without previous cleanup Greg Kroah-Hartman
2026-07-06 14:49 ` Dmitry Antipov
2026-07-06 15:18 ` Greg Kroah-Hartman [this message]
2026-07-07 5:47 ` Dmitry Antipov
2026-07-07 5:58 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026070616-handsaw-careless-c428@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dmantipov@yandex.ru \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=syzbot+b5d1f455d385b2c7da3c@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox