Skip to contentSkip to conversation

FAILED: patch "[PATCH] acpi, nfit: check for the correct event code in notifications" failed to apply to 4.4-stable tree

PATCH [email protected] 1 participant 1 message Oct 20, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From c09f12186d6b03b798832d95289af76495990192 Mon Sep 17 00:00:00 2001

From: Vishal Verma <[email protected]>
Date: Fri, 19 Aug 2016 14:40:58 -0600
Subject: [PATCH] acpi, nfit: check for the correct event code in notifications

Commit 209851649dc4 "acpi: nfit: Add support for hot-add" added support for _FIT notifications, but it neglected to verify the notification event code matches the one in the ACPI spec for "NFIT Update". Currently there is only one code in the spec, but once additional codes are added, older kernels (without this fix) will misbehave by assuming all event notifications are for an NFIT Update.

Fixes 209851649dc4 ("acpi: nfit: Add support for hot-add")
Cc Dan Williams <[email protected]>
drivers/acpi/nfit/core.c +3 -0
index 80cc7c089a15..4a363bed89b3 100644
@@ -2681,6 +2681,9 @@ static void acpi_nfit_notify(struct acpi_device *adev, u32 event)
 
 	dev_dbg(dev, "%s: event: %d\n", __func__, event);
 
+	if (event != NFIT_NOTIFY_UPDATE)
+		return;
+
 	device_lock(dev);
 	if (!dev->driver) {
 		/* dev->driver may be null if we're being removed */
drivers/acpi/nfit/nfit.h +4 -0
index e894ded24d99..51d23f130d86 100644
@@ -78,6 +78,10 @@ enum {
 	NFIT_ARS_TIMEOUT = 90,
 };
 
+enum nfit_root_notifiers {
+	NFIT_NOTIFY_UPDATE = 0x80,
+};
+
 struct nfit_spa {
 	struct list_head list;
 	struct nd_region *nd_region;