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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455527391-13622-1-git-send-email-wnhuang@google.com>
Date:	Mon, 15 Feb 2016 17:09:51 +0800
From:	Wei-Ning Huang <wnhuang@...omium.org>
To:	Linux Bluetooth <linux-bluetooth@...r.kernel.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, johan.hedberg@...el.com,
	snanda@...omium.org, djkurtz@...omium.org,
	Wei-Ning Huang <wnhuang@...omium.org>, marcel@...tmann.org,
	gustavo@...ovan.org, johan.hedberg@...il.com, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: [PATCH] Bluetooth: hci_core: cancel power off delayed work properly

From: Wei-Ning Huang <wnhuang@...omium.org>

When the HCI_AUTO_OFF flag is cleared, the power_off delayed work need
to be cancel or HCI will be powered off even if it's managed.

Signed-off-by: Wei-Ning Huang <wnhuang@...omium.org>
---
 net/bluetooth/hci_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 47bcef7..f42305a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2017,6 +2017,7 @@ static void hci_power_on(struct work_struct *work)
 	if (test_bit(HCI_UP, &hdev->flags) &&
 	    hci_dev_test_flag(hdev, HCI_MGMT) &&
 	    hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) {
+		cancel_delayed_work(&hdev->power_off);
 		hci_req_sync_lock(hdev);
 		err = __hci_req_hci_power_on(hdev);
 		hci_req_sync_unlock(hdev);
-- 
2.7.0.rc3.207.g0ac5344

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ