From patchwork Thu Oct 20 15:52:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9387251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B5A6607F0 for ; Thu, 20 Oct 2016 15:52:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BE0F29C89 for ; Thu, 20 Oct 2016 15:52:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604B029CA2; Thu, 20 Oct 2016 15:52:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007EE29C89 for ; Thu, 20 Oct 2016 15:52:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757251AbcJTPwZ (ORCPT ); Thu, 20 Oct 2016 11:52:25 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45209 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757109AbcJTPwY (ORCPT ); Thu, 20 Oct 2016 11:52:24 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C60E72062D; Thu, 20 Oct 2016 11:52:23 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 20 Oct 2016 11:52:23 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=78yRoL9/btw079st+EpYnzn77T0=; b=Sntt0 RzzjtqZkhEwkIQNIQKWYwDlZCWazM201EMwdWr31Ap0peADvPdJ/lN25WhO4Q/Uc eSEX66UWSUDVfSspYbi45kzvQCVXwLsifQYuyE5bkK5+O0jD43ZbMR8wV1L9wcC3 EVCtprPV/0Ngqw1L4uYZUfgrt12igVcbcefJGE= X-Sasl-enc: 6FO09GpIr5rRYc8eC8Co/QQ6+eyWMC7vy0h9XaCFKmvZ 1476978743 Received: from localhost (pes75-3-78-192-101-3.fbxo.proxad.net [78.192.101.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 799F2CC0BB; Thu, 20 Oct 2016 11:52:23 -0400 (EDT) Subject: FAILED: patch "[PATCH] acpi, nfit: check for the correct event code in notifications" failed to apply to 4.7-stable tree To: vishal.l.verma@intel.com, dan.j.williams@intel.com, linda.knippers@hpe.com, linux-acpi@vger.kernel.org, stable@vger.kernel.org Cc: From: Date: Thu, 20 Oct 2016 17:52:31 +0200 Message-ID: <147697875119442@kroah.com> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch below does not apply to the 4.7-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 . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From c09f12186d6b03b798832d95289af76495990192 Mon Sep 17 00:00:00 2001 From: Vishal Verma 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: Cc: Cc: Dan Williams Reported-by: Linda Knippers Signed-off-by: Vishal Verma Signed-off-by: Dan Williams --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 80cc7c089a15..4a363bed89b3 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -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 */ diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h index e894ded24d99..51d23f130d86 100644 --- a/drivers/acpi/nfit/nfit.h +++ b/drivers/acpi/nfit/nfit.h @@ -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;