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=-8.5 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,USER_AGENT_MUTT 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 C420BC43381 for ; Wed, 20 Mar 2019 20:14:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9678A218A2 for ; Wed, 20 Mar 2019 20:14:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553112862; bh=J40g/GIA0Q7Jj5qg+01YkCjheIyFgIXlMZ8G2fxa8HE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=U/y4+F2N54akiZcLiRbZNhGTufLhjhyTHfs9Eg4c+usIdw2QujSZpThUe/eWfaIR1 s1cruCXMfadyFuVQxvZ8SphkjLMiOVa3EXY970dGh5Yj7327CVZNqdVoTkDaIPZm32 7gVM14H6LatC7UUGRcPrc/VVI/jhmL6gY1yE0d0g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727235AbfCTUOW (ORCPT ); Wed, 20 Mar 2019 16:14:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:41986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfCTUOV (ORCPT ); Wed, 20 Mar 2019 16:14:21 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 632E021873; Wed, 20 Mar 2019 20:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553112860; bh=J40g/GIA0Q7Jj5qg+01YkCjheIyFgIXlMZ8G2fxa8HE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LEPPiUJG99w5RSveM1iDfZRHIKXw56PUKqHz66iIGbhZ7CU5R8CdX+2KqwBssWzVv jwtRE132cpuNcc92ruj2vadJZe7CPuePy5n6zjoj/J3nluw/LxF/OubKKJ6JPIJsfG KdNSARvZU5emsLhkqPmalxZrDG4d4i9m8nzYYgmw= Date: Wed, 20 Mar 2019 21:14:18 +0100 From: "gregkh@linuxfoundation.org" To: Dexuan Cui Cc: "dan.j.williams@intel.com" , "stable@vger.kernel.org" Subject: Re: FAILED: patch "[PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place" failed to apply to 4.9-stable tree Message-ID: <20190320201418.GB11793@kroah.com> References: <155309612025588@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Mar 20, 2019 at 07:15:00PM +0000, Dexuan Cui wrote: > > -----Original Message----- > > From: gregkh@linuxfoundation.org > > Sent: Wednesday, March 20, 2019 8:35 AM > > To: Dexuan Cui ; dan.j.williams@intel.com; > > stable@vger.kernel.org > > Cc: stable@vger.kernel.org > > Subject: FAILED: patch "[PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the > > right place" failed to apply to 4.9-stable tree > > > > > > The patch below does not apply to the 4.9-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, > > Hi, > I rebased the patch on linux-4.9.y (Linux 4.9.164) as below (I also attached it > for your convenience): Thanks for this and the 4.14 patch, now queued up. greg k-h