From: Dan Drown <dan-netdev@drown.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: cdc-acm: add PPS support
Date: Wed, 16 Aug 2023 09:17:04 -0500 [thread overview]
Message-ID: <ZNzaYJ7CC/G280ct@vps3.drown.org> (raw)
In-Reply-To: <cf57f9ef-90f4-7ef5-405e-78f79007f7bc@suse.com>
On Wed, Aug 16, 2023 at 11:50:15AM +0200, Oliver Neukum wrote:
> On 15.08.23 03:02, Dan Drown wrote:
> > Looks like it was put there to protect the iocount changes in the
> > surrounding code. Are your concerns around performance or deadlocks?
>
> the lock is there for that and so that wait_serial_change()
> will read consistent counts.
>
> The latter concerns me. We are calling potentially arbitrary code. That
> you intend it for PPS doesn't change that we'll call it for
> every line discipline that supports that callback.
> Line disciplines are supposed to do something with tty devices,
> aren't they? So what methods could they call in turn?
> Something that can end in wait_serial_change()?
Looking at the callers of tty_register_ldisc, the only one that passes
in a dcd_change handler is the pps-ldisc. That's not to say that
couldn't change in the future.
I could move the call to dcd_change before the read lock is acquired,
would that work for you?
next prev parent reply other threads:[~2023-08-16 14:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-06 2:26 [PATCH] usb: cdc-acm: add PPS support Dan Drown
2023-08-14 12:32 ` Oliver Neukum
2023-08-15 1:02 ` Dan Drown
2023-08-16 9:50 ` Oliver Neukum
2023-08-16 14:17 ` Dan Drown [this message]
2023-08-16 19:58 ` Oliver Neukum
2023-08-17 1:09 ` [PATCH] usb: cdc-acm: move ldisc dcd notification outside of acm's read lock Dan Drown
2023-08-17 8:19 ` Oliver Neukum
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=ZNzaYJ7CC/G280ct@vps3.drown.org \
--to=dan-netdev@drown.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.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