summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorBen YoungTae Kim <ytkim@qca.qualcomm.com>2015-08-13 22:09:42 -0700
committerMarcel Holtmann <marcel@holtmann.org>2015-08-14 08:55:31 +0200
commit10be6c0f27d729dcebaa0ac5f168009244d71fed (patch)
tree0e153e0f68c8daa473e00a50e080ee9f39bae909 /drivers/bluetooth
parent50d78bcf5d06871a0b3adcb3cbec6e6ca33f226a (diff)
downloadop-kernel-dev-10be6c0f27d729dcebaa0ac5f168009244d71fed.zip
op-kernel-dev-10be6c0f27d729dcebaa0ac5f168009244d71fed.tar.gz
Bluetooth: hciuart: Fix to use boolean flag with u32 type
debugfs_create_bool is asking to put u32 type pointer instead of bool so that passing bool type with u32* cast will cause memory corruption to read that value since it is handled by 4 bytes instead of 1 byte inside. Signed-off-by: Ben Young Tae Kim <ytkim@qca.qualcomm.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_qca.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 62e45ff..6b9b912 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -80,8 +80,8 @@ struct qca_data {
spinlock_t hci_ibs_lock; /* HCI_IBS state lock */
u8 tx_ibs_state; /* HCI_IBS transmit side power state*/
u8 rx_ibs_state; /* HCI_IBS receive side power state */
- bool tx_vote; /* Clock must be on for TX */
- bool rx_vote; /* Clock must be on for RX */
+ u32 tx_vote; /* Clock must be on for TX */
+ u32 rx_vote; /* Clock must be on for RX */
struct timer_list tx_idle_timer;
u32 tx_idle_delay;
struct timer_list wake_retrans_timer;
@@ -482,10 +482,10 @@ static void qca_debugfs_init(struct hci_dev *hdev)
&qca->ibs_recv_wakes);
debugfs_create_u64("ibs_recv_wake_acks", mode, ibs_dir,
&qca->ibs_recv_wacks);
- debugfs_create_bool("tx_vote", mode, ibs_dir, (u32 *)&qca->tx_vote);
+ debugfs_create_bool("tx_vote", mode, ibs_dir, &qca->tx_vote);
debugfs_create_u64("tx_votes_on", mode, ibs_dir, &qca->tx_votes_on);
debugfs_create_u64("tx_votes_off", mode, ibs_dir, &qca->tx_votes_off);
- debugfs_create_bool("rx_vote", mode, ibs_dir, (u32 *)&qca->rx_vote);
+ debugfs_create_bool("rx_vote", mode, ibs_dir, &qca->rx_vote);
debugfs_create_u64("rx_votes_on", mode, ibs_dir, &qca->rx_votes_on);
debugfs_create_u64("rx_votes_off", mode, ibs_dir, &qca->rx_votes_off);
debugfs_create_u64("votes_on", mode, ibs_dir, &qca->votes_on);
OpenPOWER on IntegriCloud