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: <1636011944-3424006-1-git-send-email-jiasheng@iscas.ac.cn>
Date:   Thu,  4 Nov 2021 07:45:44 +0000
From:   Jiasheng Jiang <jiasheng@...as.ac.cn>
To:     jikos@...nel.org, benjamin.tissoires@...hat.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] HID: wacom: Add parse before start

It might be better to add  hid_parse() before
wacom_parse_and_register() to ask for the report descriptor
like what wacom_probe() does.

Fixes: 471d171 ("Input: wacom - move the USB (now hid) Wacom driver in drivers/hid")
Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
---
 drivers/hid/wacom_sys.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 57bfa0a..48cb2e4 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -2486,6 +2486,9 @@ static void wacom_wireless_work(struct work_struct *work)
 
 		wacom_wac1->pid = wacom_wac->pid;
 		hid_hw_stop(hdev1);
+		error = hid_parse(wacom1->hdev);
+		if (error)
+			goto fail;
 		error = wacom_parse_and_register(wacom1, true);
 		if (error)
 			goto fail;
@@ -2498,6 +2501,9 @@ static void wacom_wireless_work(struct work_struct *work)
 				*((struct wacom_features *)id->driver_data);
 			wacom_wac2->pid = wacom_wac->pid;
 			hid_hw_stop(hdev2);
+			error = hid_parse(wacom2->hdev);
+			if (error)
+				goto fail;
 			error = wacom_parse_and_register(wacom2, true);
 			if (error)
 				goto fail;
@@ -2710,12 +2716,18 @@ static void wacom_mode_change_work(struct work_struct *work)
 	}
 
 	if (wacom1) {
+		error = hid_parse(wacom1->hdev);
+		if (error)
+			return;
 		error = wacom_parse_and_register(wacom1, false);
 		if (error)
 			return;
 	}
 
 	if (wacom2) {
+		error = hid_parse(wacom2->hdev);
+		if (error)
+			return;
 		error = wacom_parse_and_register(wacom2, false);
 		if (error)
 			return;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ