On Wed, Feb 06, 2019 at 08:06:54AM +0100, Marcel Holtmann wrote:
> 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
> 
Ok, let me make a change on hci_uart_tty_open().

Thanks,
Myungho

Reply via email to