From: Johan Hovold <johan@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hovold <johan@kernel.org>, shuah <shuah@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
"open list:NFC SUBSYSTEM" <linux-wireless@vger.kernel.org>,
chris@the-brannons.com, devel@driverdev.osuosl.org,
Rob Herring <robh@kernel.org>,
Samuel Ortiz <sameo@linux.intel.com>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
Jiri Slaby <jslaby@suse.com>,
santhameena13@gmail.com, kirk@reisers.ca,
Johan Hedberg <johan.hedberg@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
samuel.thibault@ens-lyon.org, m.maya.nakamura@gmail.com,
zhongjiang@huawei.com, Greg KH <gregkh@linuxfoundation.org>,
speakup@linux-speakup.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Bluez mailing list <linux-bluetooth@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
nishka.dasgupta_ug18@ashoka.edu.in,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] tty: Fix WARNING in tty_set_termios
Date: Thu, 31 Jan 2019 16:33:06 +0100 [thread overview]
Message-ID: <20190131153306.GT3691@localhost> (raw)
In-Reply-To: <D0EE5C33-2930-4286-998C-822DD7898B76@holtmann.org>
On Thu, Jan 31, 2019 at 04:18:33PM +0100, Marcel Holtmann wrote:
> > I agree with Al that this change doesn't make much sense. The WARN_ON
> > is there to catch any bugs leading to the termios being changed for a
> > master side pty. Those should bugs should be fixed, and not worked
> > around in order to silence a WARN_ON.
> >
> > The problem started with 7721383f4199 ("Bluetooth: hci_uart: Support
> > operational speed during setup") which introduced a new way for how
> > tty_set_termios() could end up being called for a master pty.
> >
> > As Al hinted at, setting these ldiscs for a master pty really makes no
> > sense and perhaps that is what we should prevent unless simply making
> > sure they do not call tty_set_termios() is sufficient for the time
> > being.
> >
> > Finally, note that serdev never operates on a pty, and that this is only
> > an issue for (the three) line disciplines.
>
> I think for PTYs we should just fail setting the HCI line discipline.
> Fail early and just move on with life.
Sounds good to me. At least for the pty master. There may be some people
trying to use a bluetooth device connected to a remote serial port (I've
seen descriptions of such setups at least), and maybe we need not prevent
that.
Johan
next prev parent reply other threads:[~2019-01-31 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 23:29 [PATCH] tty: Fix WARNING in tty_set_termios Shuah Khan
2019-01-26 4:14 ` Al Viro
2019-01-28 21:29 ` shuah
2019-01-30 10:32 ` Johan Hovold
2019-01-31 0:35 ` shuah
2019-01-31 15:18 ` Marcel Holtmann
2019-01-31 15:33 ` Johan Hovold [this message]
2019-01-31 23:23 ` shuah
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=20190131153306.GT3691@localhost \
--to=johan@kernel.org \
--cc=arnd@arndb.de \
--cc=chris@the-brannons.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=johan.hedberg@gmail.com \
--cc=jslaby@suse.com \
--cc=kirk@reisers.ca \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=m.maya.nakamura@gmail.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=nishka.dasgupta_ug18@ashoka.edu.in \
--cc=robh@kernel.org \
--cc=sameo@linux.intel.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=santhameena13@gmail.com \
--cc=shuah@kernel.org \
--cc=speakup@linux-speakup.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zhongjiang@huawei.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;
as well as URLs for NNTP newsgroup(s).