All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Myungho Jung <mhjungk@gmail.com>
Cc: Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Bluetooth: Add NULL check for tiocmget() and tiocmset()
Date: Wed, 6 Feb 2019 08:06:54 +0100	[thread overview]
Message-ID: <AD78221A-2ABE-4BC2-A63A-F706FD5BC2FE@holtmann.org> (raw)
In-Reply-To: <20190206063533.GA7402@myunghoj-Precision-5530>

Hi Myungho,

>>> tiocmget() and tiocmset() operations are optional and some tty drivers
>>> like pty miss the operations. Add NULL checks to prevent from
>>> dereference.
>>> 
>>> Myungho Jung (2):
>>> Bluetooth: hci_ath: Add NULL check for tiocmget() and tiocmset() in
>>>   ath_setup()
>>> Bluetooth: hci_ldisc: Add NULL check for tiocmget() and tiocmset() in
>>>   hci_uart_set_flow_control()
>>> 
>>> drivers/bluetooth/hci_ath.c   | 6 ++++++
>>> drivers/bluetooth/hci_ldisc.c | 4 ++++
>>> 2 files changed, 10 insertions(+)
>> 
>> why are we not enforcing the availability of these in the hci_uart_tty_open?
> 
> Are the operations required on any HCI UART drivers? For now, I found only 5
> drivers (ath, bcm, intel, mrvl, and qca) are explicitly calling them. So, I'm
> not sure whether it breaks any existing code with other drivers if returning
> error in open().

the H:4 spec requires setting flow control. In some cases this is done by the hciattach or btattach utility, but it still means that it is required. So failing on TTYs that don’t support it is just fine.

Regards

Marcel


  reply	other threads:[~2019-02-06  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  6:41 [PATCH v3 0/2] Bluetooth: Add NULL check for tiocmget() and tiocmset() Myungho Jung
2019-02-05  6:41 ` [PATCH v3 1/2] Bluetooth: hci_ath: Add NULL check for tiocmget() and tiocmset() in ath_setup() Myungho Jung
2019-02-05  6:41 ` [PATCH v3 2/2] Bluetooth: hci_ldisc: Add NULL check for tiocmget() and tiocmset() in hci_uart_set_flow_control() Myungho Jung
2019-07-06 10:49   ` Marcel Holtmann
2019-02-05 13:55 ` [PATCH v3 0/2] Bluetooth: Add NULL check for tiocmget() and tiocmset() Marcel Holtmann
2019-02-06  6:35   ` Myungho Jung
2019-02-06  7:06     ` Marcel Holtmann [this message]
2019-02-07 17:34       ` Myungho Jung

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=AD78221A-2ABE-4BC2-A63A-F706FD5BC2FE@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhjungk@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.