diff options
author | Ben YoungTae Kim <ytkim@qca.qualcomm.com> | 2015-08-14 01:09:42 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-08-14 02:55:31 -0400 |
commit | 10be6c0f27d729dcebaa0ac5f168009244d71fed (patch) | |
tree | 0e153e0f68c8daa473e00a50e080ee9f39bae909 | |
parent | 50d78bcf5d06871a0b3adcb3cbec6e6ca33f226a (diff) |
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>
-rw-r--r-- | drivers/bluetooth/hci_qca.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 62e45fff0b4b..6b9b91267959 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c | |||
@@ -80,8 +80,8 @@ struct qca_data { | |||
80 | spinlock_t hci_ibs_lock; /* HCI_IBS state lock */ | 80 | spinlock_t hci_ibs_lock; /* HCI_IBS state lock */ |
81 | u8 tx_ibs_state; /* HCI_IBS transmit side power state*/ | 81 | u8 tx_ibs_state; /* HCI_IBS transmit side power state*/ |
82 | u8 rx_ibs_state; /* HCI_IBS receive side power state */ | 82 | u8 rx_ibs_state; /* HCI_IBS receive side power state */ |
83 | bool tx_vote; /* Clock must be on for TX */ | 83 | u32 tx_vote; /* Clock must be on for TX */ |
84 | bool rx_vote; /* Clock must be on for RX */ | 84 | u32 rx_vote; /* Clock must be on for RX */ |
85 | struct timer_list tx_idle_timer; | 85 | struct timer_list tx_idle_timer; |
86 | u32 tx_idle_delay; | 86 | u32 tx_idle_delay; |
87 | struct timer_list wake_retrans_timer; | 87 | struct timer_list wake_retrans_timer; |
@@ -482,10 +482,10 @@ static void qca_debugfs_init(struct hci_dev *hdev) | |||
482 | &qca->ibs_recv_wakes); | 482 | &qca->ibs_recv_wakes); |
483 | debugfs_create_u64("ibs_recv_wake_acks", mode, ibs_dir, | 483 | debugfs_create_u64("ibs_recv_wake_acks", mode, ibs_dir, |
484 | &qca->ibs_recv_wacks); | 484 | &qca->ibs_recv_wacks); |
485 | debugfs_create_bool("tx_vote", mode, ibs_dir, (u32 *)&qca->tx_vote); | 485 | debugfs_create_bool("tx_vote", mode, ibs_dir, &qca->tx_vote); |
486 | debugfs_create_u64("tx_votes_on", mode, ibs_dir, &qca->tx_votes_on); | 486 | debugfs_create_u64("tx_votes_on", mode, ibs_dir, &qca->tx_votes_on); |
487 | debugfs_create_u64("tx_votes_off", mode, ibs_dir, &qca->tx_votes_off); | 487 | debugfs_create_u64("tx_votes_off", mode, ibs_dir, &qca->tx_votes_off); |
488 | debugfs_create_bool("rx_vote", mode, ibs_dir, (u32 *)&qca->rx_vote); | 488 | debugfs_create_bool("rx_vote", mode, ibs_dir, &qca->rx_vote); |
489 | debugfs_create_u64("rx_votes_on", mode, ibs_dir, &qca->rx_votes_on); | 489 | debugfs_create_u64("rx_votes_on", mode, ibs_dir, &qca->rx_votes_on); |
490 | debugfs_create_u64("rx_votes_off", mode, ibs_dir, &qca->rx_votes_off); | 490 | debugfs_create_u64("rx_votes_off", mode, ibs_dir, &qca->rx_votes_off); |
491 | debugfs_create_u64("votes_on", mode, ibs_dir, &qca->votes_on); | 491 | debugfs_create_u64("votes_on", mode, ibs_dir, &qca->votes_on); |