From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E01C43381 for ; Wed, 20 Mar 2019 15:35:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A17012183E for ; Wed, 20 Mar 2019 15:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553096132; bh=nSsnU14IFaDGQkyAxE3bO04qWRRZTXvn2SfZ/cLeyyQ=; h=Subject:To:Cc:From:Date:List-ID:From; b=DZZNXMD9ydnY913bbbLf3r1iwG5ZVJ5RJK12zgP/uEXT88HRrSGL3UZe8+4/FsT3G tolRnAmmCSa01Lax44HzMj4K9X50uC/7eMpsWh/cchxdaVubzB+sECMqlF26vPlWm4 71OOEbZNukd3dUeFHKSm0x0ErfRylQkiIpLgM74Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbfCTPfc (ORCPT ); Wed, 20 Mar 2019 11:35:32 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57649 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726169AbfCTPfc (ORCPT ); Wed, 20 Mar 2019 11:35:32 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E9CBE2229C; Wed, 20 Mar 2019 11:35:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 20 Mar 2019 11:35:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Tlz+Ym 1KROK8wqAUbL8qoqUKnqU8WB/4F7EzhYh3Q/M=; b=KOKBzvy+0wjF9am0ovondZ c6ifnfUTAGq3J7z2c6uH28PSEhJ9vaGk4+uxwICEup/bRISoHvWGCZP6c0IycIuZ +jI6LMzkLKgSD0qSf7aswPNcjSvkwKUnkz/S/S41kpRRz/MiaCyGXplybEKchdk1 +/4fcrWOVl29BYvkBqQNEuikeaO0Gyj8ybdIfA1z4vzCPOPcQMql5Zy+XaeLKqY6 cURbvBGcxOoa4L9pFSGMGP4JCedadGTmu/V/MpdkGcclVNVmdWTBeddmr9KU9osW ip5LAr1QDFEAfCnCVOv3X31VopsLcGg/F+7T3etm3cNh4FKKy/Vpya6m8+1E0pjA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieeigdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpedu X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 33DABE471F; Wed, 20 Mar 2019 11:35:30 -0400 (EDT) Subject: FAILED: patch "[PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place" failed to apply to 4.14-stable tree To: decui@microsoft.com, dan.j.williams@intel.com, stable@vger.kernel.org Cc: From: Date: Wed, 20 Mar 2019 16:35:20 +0100 Message-ID: <155309612031223@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.14-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 43f89877f26671c6309cd87d7364b1a3e66e71cf Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 30 Jan 2019 01:23:01 +0000 Subject: [PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place In the case of ND_CMD_CALL, we should also check out_obj->type. The patch uses out_obj->type, which is a short alias to out_obj->package.type. Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism") Cc: Signed-off-by: Dexuan Cui Signed-off-by: Dan Williams diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 95db6a2d0d6b..1598e3a121a6 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -535,6 +535,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, return -EINVAL; } + if (out_obj->type != ACPI_TYPE_BUFFER) { + dev_dbg(dev, "%s unexpected output object type cmd: %s type: %d\n", + dimm_name, cmd_name, out_obj->type); + rc = -EINVAL; + goto out; + } + if (call_pkg) { call_pkg->nd_fw_size = out_obj->buffer.length; memcpy(call_pkg->nd_payload + call_pkg->nd_size_in, @@ -553,13 +560,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, return 0; } - if (out_obj->package.type != ACPI_TYPE_BUFFER) { - dev_dbg(dev, "%s unexpected output object type cmd: %s type: %d\n", - dimm_name, cmd_name, out_obj->type); - rc = -EINVAL; - goto out; - } - dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name, cmd_name, out_obj->buffer.length); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,