[lkml]   [2007]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drivers/bluetooth/hci_ldisc.c: fix possible NULL dereferences
Hi Marcel,

Marcel Holtmann wrote:
>>>> Commit 22ad42033b7d2b3d7928fba9f89d1c7f8a3c9581 did not completely fix all
>>>> the possible NULL dereferences. Besides hci_uart_close(), we also need to
>>>> make sure that hdev is valid before calling hci_{unregister,free}_dev().
>>> I don't see any issue. Without HCI_UART_PROTO_SET, the hdev will never
>>> be registered. So no need to protect it twice.
>> Correct me if I am wrong. HCI_UART_PROTO_SET bit is only set if hci_uart_tty_ioctl()
>> is called with HCIUARTSETPROTO. Is it possible for the HCI device to be registered
>> and then unregistered without setting the HCI_UART_PROTO_SET bit in hdev->flags?
> look at the code. The hci_uart_tty_ioctl() is the only function that can
> register the HCI device. So besides opening the TTY and set the line
> discipline, you also have to the set the UART protocol running on top. I
> don't see any way you can achieve to register a HCI device without
> setting the HCI_UART_PROTO_SET bit in hu->flags.

Ok. Thanks for the explanation.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-30 08:51    [W:0.041 / U:5.904 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site