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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240822173810.11090-6-W_Armin@gmx.de>
Date: Thu, 22 Aug 2024 19:38:10 +0200
From: Armin Wolf <W_Armin@....de>
To: james@...iv.tech,
	jlee@...e.com,
	corentin.chary@...il.com,
	luke@...nes.dev,
	matan@...alib.org,
	coproscefalo@...il.com
Cc: hdegoede@...hat.com,
	ilpo.jarvinen@...ux.intel.com,
	rafael@...nel.org,
	lenb@...nel.org,
	platform-driver-x86@...r.kernel.org,
	linux-hwmon@...r.kernel.org,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 5/5] platform/x86: wmi: Call both legacy and WMI driver notify handlers

Since the legacy WMI notify handlers are now using the WMI event data
provided by the WMI driver core, they can coexist with modern WMI
driver notify handlers.

Remove the precedence of WMI driver notify handlers and call both
when receiving an event.

Signed-off-by: Armin Wolf <W_Armin@....de>
---
 drivers/platform/x86/wmi.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 6b27833ba5d9..3cbe180c3fc0 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1175,15 +1175,13 @@ static int wmi_notify_device(struct device *dev, void *data)
 	}

 	down_read(&wblock->notify_lock);
-	/* The WMI driver notify handler conflicts with the legacy WMI handler.
-	 * Because of this the WMI driver notify handler takes precedence.
-	 */
-	if (wblock->dev.dev.driver && wblock->driver_ready) {
+
+	if (wblock->dev.dev.driver && wblock->driver_ready)
 		wmi_notify_driver(wblock, obj);
-	} else {
-		if (wblock->handler)
-			wblock->handler(obj, wblock->handler_data);
-	}
+
+	if (wblock->handler)
+		wblock->handler(obj, wblock->handler_data);
+
 	up_read(&wblock->notify_lock);

 	kfree(obj);
--
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ