FAILED: patch "[PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place" failed to apply to 4.14-stable tree
Subsystems (3)
[email protected]
maintainerThe 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 <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 43f89877f26671c6309cd87d7364b1a3e66e71cf Mon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
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.
drivers/acpi/nfit/core.c +7 -7
@@ -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,
Quoted 72 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, March 20, 2019 8:35 AM
To: Dexuan Cui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: FAILED: patch "[PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typein the right place" failed to apply to 4.14-stable treeThe 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 <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
43f89877f26671c6309cd87d7364b1a3e66e71cfMon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
Date: Wed, 30 Jan 2019 01:23:01 +0000
Subject: [PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typein the right placeIn the case of
ND_CMD_CALL, we should also checkout_obj->type.The patch uses
out_obj->type, which is a short alias toout_obj->package.type.Fixes 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm commandmarshaling mechanism")
Cc <[email protected]>Signed-off-by Dexuan Cui <[email protected]>Signed-off-by Dan Williams <[email protected]>drivers/acpi/nfit/core.c +7
-0@@ -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) {drivers/acpi/nfit/core.c +0
-7call_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,
drivers/acpi/nfit/core.c
Quoted 2 lines
drivers/acpi/nfit/core.c +0
-0cmd_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):
From 9c328d1c7d300e0a1c2ebc5b12b089efab74cb81 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
Date: Wed, 30 Jan 2019 01:23:01 +0000
Subject: [PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place
Reply-To: [email protected]
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.
--- drivers/acpi/nfit/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/nfit/core.c +7 -7
@@ -329,6 +329,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,
@@ -347,13 +354,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:%s unexpected output object type cmd: %s type: %d\n" , - __func__, dimm_name, cmd_name, out_obj->type); - rc = -EINVAL ; - goto out; - } -dev_dbg (dev,"%s:%s cmd: %s output length: %d\n" , __func__, dimm_name, cmd_name, out_obj->buffer.length); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
Signature · 1 line
2.19.1
From 9c328d1c7d300e0a1c2ebc5b12b089efab74cb81 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
Date: Wed, 30 Jan 2019 01:23:01 +0000
Subject: [PATCH] nfit: acpi_nfit_ctl(): Check out_obj->type in the right place
Reply-To: [email protected]
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.
--- drivers/acpi/nfit/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/nfit/core.c +7 -7
@@ -329,6 +329,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,
@@ -347,13 +354,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:%s unexpected output object type cmd: %s type: %d\n" , - __func__, dimm_name, cmd_name, out_obj->type); - rc = -EINVAL ; - goto out; - } -dev_dbg (dev,"%s:%s cmd: %s output length: %d\n" , __func__, dimm_name, cmd_name, out_obj->buffer.length); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
Signature · 1 line
2.19.1
Quoted 73 lines
-----Original Message-----
From: Dexuan Cui
Sent: Wednesday, March 20, 2019 12:09 PM
To: '[email protected]' <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: RE: FAILED: patch "[PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typein the right place" failed to apply to 4.14-stable treeQuoted 7 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, March 20, 2019 8:35 AM
To: Dexuan Cui <[email protected]>; [email protected]; [email protected]
Cc: [email protected]
Subject: FAILED: patch "[PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typeinthe
Quoted 56 lines
right place" failed to apply to 4.14-stable tree
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 <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
43f89877f26671c6309cd87d7364b1a3e66e71cfMon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
Date: Wed, 30 Jan 2019 01:23:01 +0000
Subject: [PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typein the right placeIn the case of
ND_CMD_CALL, we should also checkout_obj->type.The patch uses
out_obj->type, which is a short alias toout_obj->package.type.Fixes 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm commandmarshaling mechanism")
Cc <[email protected]>Signed-off-by Dexuan Cui <[email protected]>Signed-off-by Dan Williams <[email protected]>drivers/acpi/nfit/core.c +7
-0@@ -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) {drivers/acpi/nfit/core.c +0
-0call_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; }
Quoted 14 lines
drivers/acpi/nfit/core.c
Quoted 11 lines
drivers/acpi/nfit/core.c +0
-7-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,drivers/acpi/nfit/core.c +0
-0cmd_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
Sorry for the typo: I meant "linux-4.14.y (Linux 4.14.107)". The below pasted patch is based on Linux 4.14.107.
Quoted 62 lines
for your convenience):
From
9c328d1c7d300e0a1c2ebc5b12b089efab74cb81Mon Sep 17 00:00:00 2001
From: Dexuan Cui <[email protected]>
Date: Wed, 30 Jan 2019 01:23:01 +0000
Subject: [PATCH] nfit:acpi_nfit_ctl(): Checkout_obj->typein the right place
Reply-To: [email protected]In the case of
ND_CMD_CALL, we should also checkout_obj->type.The patch uses
out_obj->type, which is a short alias toout_obj->package.type.Fixes 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm commandmarshaling mechanism")
Cc <[email protected]>Signed-off-by Dexuan Cui <[email protected]>Signed-off-by Dan Williams <[email protected]>--- drivers/acpi/nfit/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/acpi/nfit/core.c +7
-0@@ -329,6 +329,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) {drivers/acpi/nfit/core.c +0
-7call_pkg->nd_fw_size = out_obj->buffer.length; memcpy(call_pkg->nd_payload + call_pkg->nd_size_in,@@ -347,13 +354,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:%s unexpected output object type cmd: %s type: %d\n", - __func__, dimm_name, cmd_name, out_obj->type); - rc = -EINVAL ; - goto out; - } - dev_dbg(dev, "%s:%s cmd: %s output length: %d\n", __func__,
dimm_name,drivers/acpi/nfit/core.c +0
-1cmd_name, out_obj->buffer.length); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4, --2.19.1