• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: コミット

2.4.36-stable kernel tree


コミットメタ情報

リビジョン8cbb9dae3e720db4bb055ff818f1a80173c9c768 (tree)
日時2007-06-06 14:59:12
作者Willy Tarreau <w@1wt....>
コミッターWilly Tarreau

ログメッセージ

[BACKPORT] Bluetooth: Fix NULL pointer dereference in HCI line discipline

Backport from this 2.6 patch :

Normally a serial Bluetooth device is opened, TIOSETD'ed to N_HCI line
discipline, HCIUARTSETPROTO'ed and finally closed. In case the device
fails to HCIUARTSETPROTO, closing it produces a NULL pointer dereference.

Signed-off-by: Ohad Ben-Cohen <ohad@bencohen.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

変更サマリ

差分

--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -309,7 +309,9 @@ static void hci_uart_tty_close(struct tty_struct *tty)
309309
310310 if (hu) {
311311 struct hci_dev *hdev = &hu->hdev;
312- hci_uart_close(hdev);
312+
313+ if (hdev)
314+ hci_uart_close(hdev);
313315
314316 if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
315317 hu->proto->close(hu);
旧リポジトリブラウザで表示