lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220407042623.28438-1-ruc_gongyuanjun@163.com>
Date:   Thu,  7 Apr 2022 12:26:23 +0800
From:   Yuanjun Gong <ruc_gongyuanjun@....com>
To:     Yuanjun Gong <ruc_gongyuanjun@....com>,
        Marcel Holtmann <marcel@...tmann.org>,
        linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] Bluetooth: hci_uart: check for missing tty operations

From: Gong Yuanjun <ruc_gongyuanjun@....com>

Add a check to the missing tty operations in hci_ag6xx,
hci_h4, hci_ll following the implementations in hci_ath.

Signed-off-by: Gong Yuanjun <ruc_gongyuanjun@....com>
---
 drivers/bluetooth/hci_ag6xx.c | 3 +++
 drivers/bluetooth/hci_h4.c    | 3 +++
 drivers/bluetooth/hci_ll.c    | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index 2d40302409ff..a5f141d43066 100644
--- a/drivers/bluetooth/hci_ag6xx.c
+++ b/drivers/bluetooth/hci_ag6xx.c
@@ -36,6 +36,9 @@ static int ag6xx_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	ag6xx = kzalloc(sizeof(*ag6xx), GFP_KERNEL);
 	if (!ag6xx)
 		return -ENOMEM;
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 1d0cdf023243..0ceabe340351 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -44,6 +44,9 @@ static int h4_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	h4 = kzalloc(sizeof(*h4), GFP_KERNEL);
 	if (!h4)
 		return -ENOMEM;
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 4eb420a9ed04..22166df1467f 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -114,6 +114,9 @@ static int ll_open(struct hci_uart *hu)
 
 	BT_DBG("hu %p", hu);
 
+        if (!hci_uart_has_flow_control(hu))
+            return -EOPNOTSUPP;
+
 	ll = kzalloc(sizeof(*ll), GFP_KERNEL);
 	if (!ll)
 		return -ENOMEM;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ