]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2017 22:26:20 +0000 (15:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2017 22:26:20 +0000 (15:26 -0700)
added patches:
acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch
arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch
arm64-zynqmp-fix-i2c-node-s-compatible-string.patch
arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch
asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch
benet-stricter-vxlan-offloading-check-in-be_features_check.patch
btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch
btrfs-fix-lockdep-warning-about-log_mutex.patch
btrfs-use-down_read_nested-to-make-lockdep-silent.patch
dmaengine-ioatdma-add-skylake-pci-dev-id.patch
dmaengine-ioatdma-workaround-skx-ioatdma-version.patch
dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch
irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch
l2tp-consider-as-wildcard-address-in-l2tp_ip6-socket-lookup.patch
openrisc-add-_text-symbol-to-fix-ksym-build-error.patch
perf-probe-fix-to-get-correct-modname-from-elf-header.patch
tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch
usb-dwc3-omap-fix-race-of-pm-runtime-with-irq-handler-in-probe.patch
usb-gadget-fix-copy-pasted-error-message.patch
xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch
xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch

22 files changed:
queue-4.9/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch [new file with mode: 0644]
queue-4.9/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch [new file with mode: 0644]
queue-4.9/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch [new file with mode: 0644]
queue-4.9/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch [new file with mode: 0644]
queue-4.9/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch [new file with mode: 0644]
queue-4.9/benet-stricter-vxlan-offloading-check-in-be_features_check.patch [new file with mode: 0644]
queue-4.9/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch [new file with mode: 0644]
queue-4.9/btrfs-fix-lockdep-warning-about-log_mutex.patch [new file with mode: 0644]
queue-4.9/btrfs-use-down_read_nested-to-make-lockdep-silent.patch [new file with mode: 0644]
queue-4.9/dmaengine-ioatdma-add-skylake-pci-dev-id.patch [new file with mode: 0644]
queue-4.9/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch [new file with mode: 0644]
queue-4.9/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch [new file with mode: 0644]
queue-4.9/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch [new file with mode: 0644]
queue-4.9/l2tp-consider-as-wildcard-address-in-l2tp_ip6-socket-lookup.patch [new file with mode: 0644]
queue-4.9/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch [new file with mode: 0644]
queue-4.9/perf-probe-fix-to-get-correct-modname-from-elf-header.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch [new file with mode: 0644]
queue-4.9/usb-dwc3-omap-fix-race-of-pm-runtime-with-irq-handler-in-probe.patch [new file with mode: 0644]
queue-4.9/usb-gadget-fix-copy-pasted-error-message.patch [new file with mode: 0644]
queue-4.9/xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch [new file with mode: 0644]
queue-4.9/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch [new file with mode: 0644]

diff --git a/queue-4.9/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch b/queue-4.9/acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch
new file mode 100644 (file)
index 0000000..8db557b
--- /dev/null
@@ -0,0 +1,55 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 30 Dec 2016 02:27:31 +0100
+Subject: ACPI / scan: Prefer devices without _HID/_CID for _ADR matching
+
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+
+
+[ Upstream commit c2a6bbaf0c5f90463a7011a295bbdb7e33c80b51 ]
+
+The way acpi_find_child_device() works currently is that, if there
+are two (or more) devices with the same _ADR value in the same
+namespace scope (which is not specifically allowed by the spec and
+the OS behavior in that case is not defined), the first one of them
+found to be present (with the help of _STA) will be returned.
+
+This covers the majority of cases, but is not sufficient if some of
+the devices in question have a _HID (or _CID) returning some valid
+ACPI/PNP device IDs (which is disallowed by the spec) and the
+ASL writers' expectation appears to be that the OS will match
+devices without a valid ACPI/PNP device ID against a given bus
+address first.
+
+To cover this special case as well, modify find_child_checks()
+to prefer devices without ACPI/PNP device IDs over devices that
+have them.
+
+Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Tested-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/glue.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/glue.c
++++ b/drivers/acpi/glue.c
+@@ -98,7 +98,15 @@ static int find_child_checks(struct acpi
+       if (check_children && list_empty(&adev->children))
+               return -ENODEV;
+-      return sta_present ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
++      /*
++       * If the device has a _HID (or _CID) returning a valid ACPI/PNP
++       * device ID, it is better to make it look less attractive here, so that
++       * the other device with the same _ADR value (that may not have a valid
++       * device ID) can be matched going forward.  [This means a second spec
++       * violation in a row, so whatever we do here is best effort anyway.]
++       */
++      return sta_present && list_empty(&adev->pnp.ids) ?
++                      FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE;
+ }
+ struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
diff --git a/queue-4.9/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch b/queue-4.9/arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch
new file mode 100644 (file)
index 0000000..ac39ff4
--- /dev/null
@@ -0,0 +1,38 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Krzysztof Kozlowski <krzk@kernel.org>
+Date: Thu, 29 Dec 2016 14:41:05 +0200
+Subject: ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_*
+
+From: Krzysztof Kozlowski <krzk@kernel.org>
+
+
+[ Upstream commit 3ef01c968fbfb21c2f16281445d30a865ee4412c ]
+
+NF_CT_PROTO_DCCP/SCTP/UDPLITE were switched from tristate to boolean so
+defconfig needs to be adjusted to silence warnings:
+       warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
+       warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP
+       warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
+
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm/configs/s3c2410_defconfig |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/configs/s3c2410_defconfig
++++ b/arch/arm/configs/s3c2410_defconfig
+@@ -86,9 +86,9 @@ CONFIG_IPV6_TUNNEL=m
+ CONFIG_NETFILTER=y
+ CONFIG_NF_CONNTRACK=m
+ CONFIG_NF_CONNTRACK_EVENTS=y
+-CONFIG_NF_CT_PROTO_DCCP=m
+-CONFIG_NF_CT_PROTO_SCTP=m
+-CONFIG_NF_CT_PROTO_UDPLITE=m
++CONFIG_NF_CT_PROTO_DCCP=y
++CONFIG_NF_CT_PROTO_SCTP=y
++CONFIG_NF_CT_PROTO_UDPLITE=y
+ CONFIG_NF_CONNTRACK_AMANDA=m
+ CONFIG_NF_CONNTRACK_FTP=m
+ CONFIG_NF_CONNTRACK_H323=m
diff --git a/queue-4.9/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch b/queue-4.9/arm64-zynqmp-fix-i2c-node-s-compatible-string.patch
new file mode 100644 (file)
index 0000000..08166ff
--- /dev/null
@@ -0,0 +1,46 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Moritz Fischer <mdf@kernel.org>
+Date: Thu, 22 Dec 2016 09:19:25 -0800
+Subject: ARM64: zynqmp: Fix i2c node's compatible string
+
+From: Moritz Fischer <mdf@kernel.org>
+
+
+[ Upstream commit c415f9e8304a1d235ef118d912f374ee2e46c45d ]
+
+The Zynq Ultrascale MP uses version 1.4 of the Cadence IP core
+which fixes some silicon bugs that needed software workarounds
+in Version 1.0 that was used on Zynq systems.
+
+Signed-off-by: Moritz Fischer <mdf@kernel.org>
+Cc: Michal Simek <michal.simek@xilinx.com>
+Cc: Sören Brinkmann <soren.brinkmann@xilinx.com>
+Cc: Rob Herring <robh+dt@kernel.org>
+Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
+Signed-off-by: Michal Simek <michal.simek@xilinx.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/xilinx/zynqmp.dtsi |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
++++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+@@ -175,7 +175,7 @@
+               };
+               i2c0: i2c@ff020000 {
+-                      compatible = "cdns,i2c-r1p10";
++                      compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
+                       status = "disabled";
+                       interrupt-parent = <&gic>;
+                       interrupts = <0 17 4>;
+@@ -185,7 +185,7 @@
+               };
+               i2c1: i2c@ff030000 {
+-                      compatible = "cdns,i2c-r1p10";
++                      compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
+                       status = "disabled";
+                       interrupt-parent = <&gic>;
+                       interrupts = <0 18 4>;
diff --git a/queue-4.9/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch b/queue-4.9/arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch
new file mode 100644 (file)
index 0000000..3b287a9
--- /dev/null
@@ -0,0 +1,46 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Michal Simek <michal.simek@xilinx.com>
+Date: Tue, 15 Nov 2016 14:53:13 +0100
+Subject: ARM64: zynqmp: Fix W=1 dtc 1.4 warnings
+
+From: Michal Simek <michal.simek@xilinx.com>
+
+
+[ Upstream commit 4ea2a6be9565455f152c12f80222af1582ede0c7 ]
+
+The patch removes these warnings reported by dtc 1.4:
+Warning (unit_address_vs_reg): Node /amba_apu has a reg or ranges
+property, but no unit name
+Warning (unit_address_vs_reg): Node /memory has a reg or ranges
+property, but no unit name
+
+Signed-off-by: Michal Simek <michal.simek@xilinx.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts |    2 +-
+ arch/arm64/boot/dts/xilinx/zynqmp.dtsi      |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts
++++ b/arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts
+@@ -27,7 +27,7 @@
+               stdout-path = "serial0:115200n8";
+       };
+-      memory {
++      memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x40000000>;
+       };
+--- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
++++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi
+@@ -72,7 +72,7 @@
+                            <1 10 0xf08>;
+       };
+-      amba_apu {
++      amba_apu: amba_apu@0 {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <1>;
diff --git a/queue-4.9/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch b/queue-4.9/asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch
new file mode 100644 (file)
index 0000000..7dcd3c2
--- /dev/null
@@ -0,0 +1,47 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: John Hsu <KCHSU0@nuvoton.com>
+Date: Tue, 20 Dec 2016 12:03:09 +0800
+Subject: ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
+
+From: John Hsu <KCHSU0@nuvoton.com>
+
+
+[ Upstream commit a1792cda51300e15b03549cccf0b09f3be82e697 ]
+
+The clk_ref_div is not configured in the correct position of the
+register. The patch fixes that clk_ref_div, Pre-Scalar, is assigned
+the wrong value.
+
+Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/codecs/nau8825.c |    3 ++-
+ sound/soc/codecs/nau8825.h |    3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/codecs/nau8825.c
++++ b/sound/soc/codecs/nau8825.c
+@@ -1928,7 +1928,8 @@ static void nau8825_fll_apply(struct nau
+                       NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
+       /* FLL pre-scaler */
+       regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4,
+-                      NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div);
++                      NAU8825_FLL_REF_DIV_MASK,
++                      fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT);
+       /* select divided VCO input */
+       regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
+               NAU8825_FLL_CLK_SW_MASK, NAU8825_FLL_CLK_SW_REF);
+--- a/sound/soc/codecs/nau8825.h
++++ b/sound/soc/codecs/nau8825.h
+@@ -129,7 +129,8 @@
+ #define NAU8825_FLL_CLK_SRC_FS                        (0x3 << NAU8825_FLL_CLK_SRC_SFT)
+ /* FLL4 (0x07) */
+-#define NAU8825_FLL_REF_DIV_MASK              (0x3 << 10)
++#define NAU8825_FLL_REF_DIV_SFT       10
++#define NAU8825_FLL_REF_DIV_MASK      (0x3 << NAU8825_FLL_REF_DIV_SFT)
+ /* FLL5 (0x08) */
+ #define NAU8825_FLL_PDB_DAC_EN                (0x1 << 15)
diff --git a/queue-4.9/benet-stricter-vxlan-offloading-check-in-be_features_check.patch b/queue-4.9/benet-stricter-vxlan-offloading-check-in-be_features_check.patch
new file mode 100644 (file)
index 0000000..96b5696
--- /dev/null
@@ -0,0 +1,47 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Sabrina Dubroca <sd@queasysnail.net>
+Date: Tue, 3 Jan 2017 16:26:04 +0100
+Subject: benet: stricter vxlan offloading check in be_features_check
+
+From: Sabrina Dubroca <sd@queasysnail.net>
+
+
+[ Upstream commit 096de2f83ebc8e0404c5b7e847a4abd27b9739da ]
+
+When VXLAN offloading is enabled, be_features_check() tries to check if
+an encapsulated packet is indeed a VXLAN packet. The check is not strict
+enough, and considers any UDP-encapsulated ethernet frame with a 8-byte
+tunnel header as being VXLAN. Unfortunately, both GENEVE and VXLAN-GPE
+have a 8-byte header, so they get through this check.
+
+Force the UDP destination port to be the one that has been offloaded to
+hardware.
+
+Without this, GENEVE-encapsulated packets can end up having an incorrect
+checksum when both a GENEVE and a VXLAN (offloaded) tunnel are
+configured.
+
+This is similar to commit a547224dceed ("mlx4e: Do not attempt to
+offload VXLAN ports that are unrecognized").
+
+Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/emulex/benet/be_main.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/emulex/benet/be_main.c
++++ b/drivers/net/ethernet/emulex/benet/be_main.c
+@@ -5186,7 +5186,9 @@ static netdev_features_t be_features_che
+           skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
+           skb->inner_protocol != htons(ETH_P_TEB) ||
+           skb_inner_mac_header(skb) - skb_transport_header(skb) !=
+-          sizeof(struct udphdr) + sizeof(struct vxlanhdr))
++              sizeof(struct udphdr) + sizeof(struct vxlanhdr) ||
++          !adapter->vxlan_port ||
++          udp_hdr(skb)->dest != adapter->vxlan_port)
+               return features & ~(NETIF_F_CSUM_MASK | NETIF_F_GSO_MASK);
+       return features;
diff --git a/queue-4.9/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch b/queue-4.9/btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch
new file mode 100644 (file)
index 0000000..81aefba
--- /dev/null
@@ -0,0 +1,52 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Liu Bo <bo.li.liu@oracle.com>
+Date: Thu, 22 Dec 2016 17:13:54 -0800
+Subject: Btrfs: adjust outstanding_extents counter properly when dio write is split
+
+From: Liu Bo <bo.li.liu@oracle.com>
+
+
+[ Upstream commit c2931667c83ded6504b3857e99cc45b21fa496fb ]
+
+Currently how btrfs dio deals with split dio write is not good
+enough if dio write is split into several segments due to the
+lack of contiguous space, a large dio write like 'dd bs=1G count=1'
+can end up with incorrect outstanding_extents counter and endio
+would complain loudly with an assertion.
+
+This fixes the problem by compensating the outstanding_extents
+counter in inode if a large dio write gets split.
+
+Reported-by: Anand Jain <anand.jain@oracle.com>
+Tested-by: Anand Jain <anand.jain@oracle.com>
+Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/inode.c |   11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/fs/btrfs/inode.c
++++ b/fs/btrfs/inode.c
+@@ -7648,11 +7648,18 @@ static void adjust_dio_outstanding_exten
+        * within our reservation, otherwise we need to adjust our inode
+        * counter appropriately.
+        */
+-      if (dio_data->outstanding_extents) {
++      if (dio_data->outstanding_extents >= num_extents) {
+               dio_data->outstanding_extents -= num_extents;
+       } else {
++              /*
++               * If dio write length has been split due to no large enough
++               * contiguous space, we need to compensate our inode counter
++               * appropriately.
++               */
++              u64 num_needed = num_extents - dio_data->outstanding_extents;
++
+               spin_lock(&BTRFS_I(inode)->lock);
+-              BTRFS_I(inode)->outstanding_extents += num_extents;
++              BTRFS_I(inode)->outstanding_extents += num_needed;
+               spin_unlock(&BTRFS_I(inode)->lock);
+       }
+ }
diff --git a/queue-4.9/btrfs-fix-lockdep-warning-about-log_mutex.patch b/queue-4.9/btrfs-fix-lockdep-warning-about-log_mutex.patch
new file mode 100644 (file)
index 0000000..a15693c
--- /dev/null
@@ -0,0 +1,69 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Liu Bo <bo.li.liu@oracle.com>
+Date: Wed, 30 Nov 2016 16:20:25 -0800
+Subject: Btrfs: fix lockdep warning about log_mutex
+
+From: Liu Bo <bo.li.liu@oracle.com>
+
+
+[ Upstream commit 781feef7e6befafd4d9787d1f7ada1f9ccd504e4 ]
+
+While checking INODE_REF/INODE_EXTREF for a corner case, we may acquire a
+different inode's log_mutex with holding the current inode's log_mutex, and
+lockdep has complained this with a possilble deadlock warning.
+
+Fix this by using mutex_lock_nested() when processing the other inode's
+log_mutex.
+
+Reviewed-by: Filipe Manana <fdmanana@suse.com>
+Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/tree-log.c |   13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/fs/btrfs/tree-log.c
++++ b/fs/btrfs/tree-log.c
+@@ -37,6 +37,7 @@
+  */
+ #define LOG_INODE_ALL 0
+ #define LOG_INODE_EXISTS 1
++#define LOG_OTHER_INODE 2
+ /*
+  * directory trouble cases
+@@ -4623,7 +4624,7 @@ static int btrfs_log_inode(struct btrfs_
+       if (S_ISDIR(inode->i_mode) ||
+           (!test_bit(BTRFS_INODE_NEEDS_FULL_SYNC,
+                      &BTRFS_I(inode)->runtime_flags) &&
+-           inode_only == LOG_INODE_EXISTS))
++           inode_only >= LOG_INODE_EXISTS))
+               max_key.type = BTRFS_XATTR_ITEM_KEY;
+       else
+               max_key.type = (u8)-1;
+@@ -4647,7 +4648,13 @@ static int btrfs_log_inode(struct btrfs_
+               return ret;
+       }
+-      mutex_lock(&BTRFS_I(inode)->log_mutex);
++      if (inode_only == LOG_OTHER_INODE) {
++              inode_only = LOG_INODE_EXISTS;
++              mutex_lock_nested(&BTRFS_I(inode)->log_mutex,
++                                SINGLE_DEPTH_NESTING);
++      } else {
++              mutex_lock(&BTRFS_I(inode)->log_mutex);
++      }
+       /*
+        * a brute force approach to making sure we get the most uptodate
+@@ -4799,7 +4806,7 @@ again:
+                                * unpin it.
+                                */
+                               err = btrfs_log_inode(trans, root, other_inode,
+-                                                    LOG_INODE_EXISTS,
++                                                    LOG_OTHER_INODE,
+                                                     0, LLONG_MAX, ctx);
+                               iput(other_inode);
+                               if (err)
diff --git a/queue-4.9/btrfs-use-down_read_nested-to-make-lockdep-silent.patch b/queue-4.9/btrfs-use-down_read_nested-to-make-lockdep-silent.patch
new file mode 100644 (file)
index 0000000..7a944e5
--- /dev/null
@@ -0,0 +1,36 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Liu Bo <bo.li.liu@oracle.com>
+Date: Wed, 30 Nov 2016 16:11:04 -0800
+Subject: Btrfs: use down_read_nested to make lockdep silent
+
+From: Liu Bo <bo.li.liu@oracle.com>
+
+
+[ Upstream commit e321f8a801d7b4c40da8005257b05b9c2b51b072 ]
+
+If @block_group is not @used_bg, it'll try to get @used_bg's lock without
+droping @block_group 's lock and lockdep has throwed a scary deadlock warning
+about it.
+Fix it by using down_read_nested.
+
+Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
+Reviewed-by: David Sterba <dsterba@suse.com>
+Signed-off-by: David Sterba <dsterba@suse.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/btrfs/extent-tree.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/btrfs/extent-tree.c
++++ b/fs/btrfs/extent-tree.c
+@@ -7401,7 +7401,8 @@ btrfs_lock_cluster(struct btrfs_block_gr
+               spin_unlock(&cluster->refill_lock);
+-              down_read(&used_bg->data_rwsem);
++              /* We should only have one-level nested. */
++              down_read_nested(&used_bg->data_rwsem, SINGLE_DEPTH_NESTING);
+               spin_lock(&cluster->refill_lock);
+               if (used_bg == cluster->block_group)
diff --git a/queue-4.9/dmaengine-ioatdma-add-skylake-pci-dev-id.patch b/queue-4.9/dmaengine-ioatdma-add-skylake-pci-dev-id.patch
new file mode 100644 (file)
index 0000000..ebce3d7
--- /dev/null
@@ -0,0 +1,60 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Dave Jiang <dave.jiang@intel.com>
+Date: Tue, 13 Dec 2016 11:15:21 -0700
+Subject: dmaengine: ioatdma: Add Skylake PCI Dev ID
+
+From: Dave Jiang <dave.jiang@intel.com>
+
+
+[ Upstream commit 1594c18fd297a8edcc72bc4b161f3f52603ebb92 ]
+
+Adding Skylake Xeon PCI device ids for ioatdma and related bits.
+
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/ioat/hw.h   |    2 ++
+ drivers/dma/ioat/init.c |    9 ++++++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/dma/ioat/hw.h
++++ b/drivers/dma/ioat/hw.h
+@@ -64,6 +64,8 @@
+ #define PCI_DEVICE_ID_INTEL_IOAT_BDX8 0x6f2e
+ #define PCI_DEVICE_ID_INTEL_IOAT_BDX9 0x6f2f
++#define PCI_DEVICE_ID_INTEL_IOAT_SKX  0x2021
++
+ #define IOAT_VER_1_2            0x12    /* Version 1.2 */
+ #define IOAT_VER_2_0            0x20    /* Version 2.0 */
+ #define IOAT_VER_3_0            0x30    /* Version 3.0 */
+--- a/drivers/dma/ioat/init.c
++++ b/drivers/dma/ioat/init.c
+@@ -106,6 +106,8 @@ static struct pci_device_id ioat_pci_tbl
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX8) },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX9) },
++      { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_SKX) },
++
+       /* I/OAT v3.3 platforms */
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD0) },
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD1) },
+@@ -243,10 +245,15 @@ static bool is_bdx_ioat(struct pci_dev *
+       }
+ }
++static inline bool is_skx_ioat(struct pci_dev *pdev)
++{
++      return (pdev->device == PCI_DEVICE_ID_INTEL_IOAT_SKX) ? true : false;
++}
++
+ static bool is_xeon_cb32(struct pci_dev *pdev)
+ {
+       return is_jf_ioat(pdev) || is_snb_ioat(pdev) || is_ivb_ioat(pdev) ||
+-              is_hsw_ioat(pdev) || is_bdx_ioat(pdev);
++              is_hsw_ioat(pdev) || is_bdx_ioat(pdev) || is_skx_ioat(pdev);
+ }
+ bool is_bwd_ioat(struct pci_dev *pdev)
diff --git a/queue-4.9/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch b/queue-4.9/dmaengine-ioatdma-workaround-skx-ioatdma-version.patch
new file mode 100644 (file)
index 0000000..5f9a03d
--- /dev/null
@@ -0,0 +1,33 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Dave Jiang <dave.jiang@intel.com>
+Date: Tue, 13 Dec 2016 11:15:27 -0700
+Subject: dmaengine: ioatdma: workaround SKX ioatdma version
+
+From: Dave Jiang <dave.jiang@intel.com>
+
+
+[ Upstream commit 34a31f0af84158955a9747fb5c6712da5bbb5331 ]
+
+The Skylake ioatdma is technically CBDMA 3.2+ and contains the same hardware
+bits with some additional 3.3 features, but it's not really 3.3 where the
+driver is concerned.
+
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/ioat/init.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/dma/ioat/init.c
++++ b/drivers/dma/ioat/init.c
+@@ -1357,6 +1357,8 @@ static int ioat_pci_probe(struct pci_dev
+       device->version = readb(device->reg_base + IOAT_VER_OFFSET);
+       if (device->version >= IOAT_VER_3_0) {
++              if (is_skx_ioat(pdev))
++                      device->version = IOAT_VER_3_2;
+               err = ioat3_dma_probe(device, ioat_dca_enabled);
+               if (device->version >= IOAT_VER_3_3)
diff --git a/queue-4.9/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch b/queue-4.9/dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch
new file mode 100644 (file)
index 0000000..9baaef0
--- /dev/null
@@ -0,0 +1,38 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Mon, 19 Dec 2016 06:33:51 +0100
+Subject: dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path.
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+
+[ Upstream commit 75bdc7f31a3a6e9a12e218b31a44a1f54a91554c ]
+
+Add some missing 'of_node_put()' in early exit error path.
+
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Signed-off-by: Vinod Koul <vinod.koul@intel.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/ti-dma-crossbar.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/dma/ti-dma-crossbar.c
++++ b/drivers/dma/ti-dma-crossbar.c
+@@ -149,6 +149,7 @@ static int ti_am335x_xbar_probe(struct p
+       match = of_match_node(ti_am335x_master_match, dma_node);
+       if (!match) {
+               dev_err(&pdev->dev, "DMA master is not supported\n");
++              of_node_put(dma_node);
+               return -EINVAL;
+       }
+@@ -339,6 +340,7 @@ static int ti_dra7_xbar_probe(struct pla
+       match = of_match_node(ti_dra7_master_match, dma_node);
+       if (!match) {
+               dev_err(&pdev->dev, "DMA master is not supported\n");
++              of_node_put(dma_node);
+               return -EINVAL;
+       }
diff --git a/queue-4.9/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch b/queue-4.9/irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch
new file mode 100644 (file)
index 0000000..0c5011d
--- /dev/null
@@ -0,0 +1,48 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Stefan Wahren <stefan.wahren@i2se.com>
+Date: Tue, 27 Dec 2016 18:29:57 +0000
+Subject: irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
+
+From: Stefan Wahren <stefan.wahren@i2se.com>
+
+
+[ Upstream commit 88e20c74ee020f9e0c99dfce0dd9aa61c3f0cca0 ]
+
+The ICOLL controller doesn't provide any facility to configure the
+wakeup sources. That's the reason why this implementation lacks
+the irq_set_wake implementation. But this prevent us from properly
+entering power management states like "suspend to idle".
+
+So enable the flags IRQCHIP_SKIP_SET_WAKE and
+IRQCHIP_MASK_ON_SUSPEND to let the irqchip core allows and handles
+the power management.
+
+Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
+Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
+Link: https://lkml.kernel.org/r/1482863397-11400-1-git-send-email-stefan.wahren@i2se.com
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/irqchip/irq-mxs.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/irqchip/irq-mxs.c
++++ b/drivers/irqchip/irq-mxs.c
+@@ -131,12 +131,16 @@ static struct irq_chip mxs_icoll_chip =
+       .irq_ack = icoll_ack_irq,
+       .irq_mask = icoll_mask_irq,
+       .irq_unmask = icoll_unmask_irq,
++      .flags = IRQCHIP_MASK_ON_SUSPEND |
++               IRQCHIP_SKIP_SET_WAKE,
+ };
+ static struct irq_chip asm9260_icoll_chip = {
+       .irq_ack = icoll_ack_irq,
+       .irq_mask = asm9260_mask_irq,
+       .irq_unmask = asm9260_unmask_irq,
++      .flags = IRQCHIP_MASK_ON_SUSPEND |
++               IRQCHIP_SKIP_SET_WAKE,
+ };
+ asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
diff --git a/queue-4.9/l2tp-consider-as-wildcard-address-in-l2tp_ip6-socket-lookup.patch b/queue-4.9/l2tp-consider-as-wildcard-address-in-l2tp_ip6-socket-lookup.patch
new file mode 100644 (file)
index 0000000..9397c61
--- /dev/null
@@ -0,0 +1,45 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Guillaume Nault <g.nault@alphalink.fr>
+Date: Fri, 30 Dec 2016 19:48:19 +0100
+Subject: l2tp: consider '::' as wildcard address in l2tp_ip6 socket lookup
+
+From: Guillaume Nault <g.nault@alphalink.fr>
+
+
+[ Upstream commit 97b84fd6d91766ea57dcc350d78f42639e011c30 ]
+
+An L2TP socket bound to the unspecified address should match with any
+address. If not, it can't receive any packet and __l2tp_ip6_bind_lookup()
+can't prevent another socket from binding on the same device/tunnel ID.
+
+While there, rename the 'addr' variable to 'sk_laddr' (local addr), to
+make following patch clearer.
+
+Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/l2tp/l2tp_ip6.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/l2tp/l2tp_ip6.c
++++ b/net/l2tp/l2tp_ip6.c
+@@ -64,7 +64,7 @@ static struct sock *__l2tp_ip6_bind_look
+       struct sock *sk;
+       sk_for_each_bound(sk, &l2tp_ip6_bind_table) {
+-              const struct in6_addr *addr = inet6_rcv_saddr(sk);
++              const struct in6_addr *sk_laddr = inet6_rcv_saddr(sk);
+               struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk);
+               if (l2tp == NULL)
+@@ -72,7 +72,7 @@ static struct sock *__l2tp_ip6_bind_look
+               if ((l2tp->conn_id == tunnel_id) &&
+                   net_eq(sock_net(sk), net) &&
+-                  (!addr || ipv6_addr_equal(addr, laddr)) &&
++                  (!sk_laddr || ipv6_addr_any(sk_laddr) || ipv6_addr_equal(sk_laddr, laddr)) &&
+                   (!sk->sk_bound_dev_if || !dif ||
+                    sk->sk_bound_dev_if == dif))
+                       goto found;
diff --git a/queue-4.9/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch b/queue-4.9/openrisc-add-_text-symbol-to-fix-ksym-build-error.patch
new file mode 100644 (file)
index 0000000..0486d6b
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Stafford Horne <shorne@gmail.com>
+Date: Wed, 14 Dec 2016 21:27:57 +0900
+Subject: openrisc: Add _text symbol to fix ksym build error
+
+From: Stafford Horne <shorne@gmail.com>
+
+
+[ Upstream commit 086cc1c31a0ec075dac02425367c871bb65bc2c9 ]
+
+The build robot reports:
+
+   .tmp_kallsyms1.o: In function `kallsyms_relative_base':
+>> (.rodata+0x8a18): undefined reference to `_text'
+
+This is when using 'make alldefconfig'. Adding this _text symbol to mark
+the start of the kernel as in other architecture fixes this.
+
+Signed-off-by: Stafford Horne <shorne@gmail.com>
+Acked-by: Jonas Bonn <jonas@southpole.se>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/openrisc/kernel/vmlinux.lds.S |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/openrisc/kernel/vmlinux.lds.S
++++ b/arch/openrisc/kernel/vmlinux.lds.S
+@@ -38,6 +38,8 @@ SECTIONS
+         /* Read-only sections, merged into text segment: */
+         . = LOAD_BASE ;
++      _text = .;
++
+       /* _s_kernel_ro must be page aligned */
+       . = ALIGN(PAGE_SIZE);
+       _s_kernel_ro = .;
diff --git a/queue-4.9/perf-probe-fix-to-get-correct-modname-from-elf-header.patch b/queue-4.9/perf-probe-fix-to-get-correct-modname-from-elf-header.patch
new file mode 100644 (file)
index 0000000..252aa16
--- /dev/null
@@ -0,0 +1,99 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Masami Hiramatsu <mhiramat@kernel.org>
+Date: Tue, 3 Jan 2017 00:20:49 +0900
+Subject: perf probe: Fix to get correct modname from elf header
+
+From: Masami Hiramatsu <mhiramat@kernel.org>
+
+
+[ Upstream commit 1f2ed153b916c95a49a1ca9d7107738664224b7f ]
+
+Since 'perf probe' supports cross-arch probes, it is possible to analyze
+different arch kernel image which has different bits-per-long.
+
+In that case, it fails to get the module name because it uses the
+MOD_NAME_OFFSET macro based on the host machine bits-per-long, instead
+of the target arch bits-per-long.
+
+This fixes above issue by changing modname-offset based on the target
+archs bit width. This is ok because linux kernel uses LP64 model on
+64bit arch.
+
+E.g. without this (on x86_64, and target module is arm32):
+
+  $ perf probe -m build-arm/fs/configfs/configfs.ko -D configfs_lookup
+  p:probe/configfs_lookup :configfs_lookup+0
+                          ^-Here is an empty module name.
+
+With this fix, you can see correct module name:
+
+  $ perf probe -m build-arm/fs/configfs/configfs.ko -D configfs_lookup
+  p:probe/configfs_lookup configfs:configfs_lookup+0
+
+Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lkml.kernel.org/r/148337043836.6752.383495516397005695.stgit@devbox
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/util/probe-event.c |   32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+--- a/tools/perf/util/probe-event.c
++++ b/tools/perf/util/probe-event.c
+@@ -268,21 +268,6 @@ static bool kprobe_warn_out_range(const
+ }
+ /*
+- * NOTE:
+- * '.gnu.linkonce.this_module' section of kernel module elf directly
+- * maps to 'struct module' from linux/module.h. This section contains
+- * actual module name which will be used by kernel after loading it.
+- * But, we cannot use 'struct module' here since linux/module.h is not
+- * exposed to user-space. Offset of 'name' has remained same from long
+- * time, so hardcoding it here.
+- */
+-#ifdef __LP64__
+-#define MOD_NAME_OFFSET 24
+-#else
+-#define MOD_NAME_OFFSET 12
+-#endif
+-
+-/*
+  * @module can be module name of module file path. In case of path,
+  * inspect elf and find out what is actual module name.
+  * Caller has to free mod_name after using it.
+@@ -296,6 +281,7 @@ static char *find_module_name(const char
+       Elf_Data *data;
+       Elf_Scn *sec;
+       char *mod_name = NULL;
++      int name_offset;
+       fd = open(module, O_RDONLY);
+       if (fd < 0)
+@@ -317,7 +303,21 @@ static char *find_module_name(const char
+       if (!data || !data->d_buf)
+               goto ret_err;
+-      mod_name = strdup((char *)data->d_buf + MOD_NAME_OFFSET);
++      /*
++       * NOTE:
++       * '.gnu.linkonce.this_module' section of kernel module elf directly
++       * maps to 'struct module' from linux/module.h. This section contains
++       * actual module name which will be used by kernel after loading it.
++       * But, we cannot use 'struct module' here since linux/module.h is not
++       * exposed to user-space. Offset of 'name' has remained same from long
++       * time, so hardcoding it here.
++       */
++      if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
++              name_offset = 12;
++      else    /* expect ELFCLASS64 by default */
++              name_offset = 24;
++
++      mod_name = strdup((char *)data->d_buf + name_offset);
+ ret_err:
+       elf_end(elf);
index 05ea493e5e0f6d9ebf07c594fc6bb6080b9aef94..dedfb407bbd26601f030333f32ad5d30f56b8592 100644 (file)
@@ -62,3 +62,24 @@ vfio-pci-use-32-bit-comparisons-for-register-address-for-gcc-4.5.patch
 irqchip-keystone-fix-scheduling-while-atomic-on-rt.patch
 asoc-tlv320aic3x-mark-the-reset-register-as-volatile.patch
 spi-dw-make-debugfs-name-unique-between-instances.patch
+asoc-nau8825-fix-invalid-configuration-in-pre-scalar-of-fll.patch
+irqchip-mxs-enable-skip_set_wake-and-mask_on_suspend.patch
+openrisc-add-_text-symbol-to-fix-ksym-build-error.patch
+dmaengine-ioatdma-add-skylake-pci-dev-id.patch
+dmaengine-ioatdma-workaround-skx-ioatdma-version.patch
+l2tp-consider-as-wildcard-address-in-l2tp_ip6-socket-lookup.patch
+dmaengine-ti-dma-crossbar-add-some-of_node_put-in-error-path.patch
+usb-dwc3-omap-fix-race-of-pm-runtime-with-irq-handler-in-probe.patch
+arm64-zynqmp-fix-w-1-dtc-1.4-warnings.patch
+arm64-zynqmp-fix-i2c-node-s-compatible-string.patch
+perf-probe-fix-to-get-correct-modname-from-elf-header.patch
+arm-s3c2410_defconfig-fix-invalid-values-for-nf_ct_proto_.patch
+acpi-scan-prefer-devices-without-_hid-_cid-for-_adr-matching.patch
+usb-gadget-fix-copy-pasted-error-message.patch
+btrfs-use-down_read_nested-to-make-lockdep-silent.patch
+btrfs-fix-lockdep-warning-about-log_mutex.patch
+benet-stricter-vxlan-offloading-check-in-be_features_check.patch
+btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch
+xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch
+tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch
+xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch
diff --git a/queue-4.9/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch b/queue-4.9/tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch
new file mode 100644 (file)
index 0000000..64fe7e1
--- /dev/null
@@ -0,0 +1,119 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Daniel Bristot de Oliveira <bristot@redhat.com>
+Date: Tue, 3 Jan 2017 12:42:42 +0100
+Subject: tools lib traceevent: Fix prev/next_prio for deadline tasks
+
+From: Daniel Bristot de Oliveira <bristot@redhat.com>
+
+
+[ Upstream commit 074859184d770824f4437dca716bdeb625ae8b1c ]
+
+Currently, the sched:sched_switch tracepoint reports deadline tasks with
+priority -1. But when reading the trace via perf script I've got the
+following output:
+
+  # ./d & # (d is a deadline task, see [1])
+  # perf record -e sched:sched_switch -a sleep 1
+  # perf script
+      ...
+         swapper     0 [000]  2146.962441: sched:sched_switch: swapper/0:0 [120] R ==> d:2593 [4294967295]
+               d  2593 [000]  2146.972472: sched:sched_switch: d:2593 [4294967295] R ==> g:2590 [4294967295]
+
+The task d reports the wrong priority [4294967295]. This happens because
+the "int prio" is stored in an unsigned long long val. Although it is
+set as a %lld, as int is shorter than unsigned long long,
+trace_seq_printf prints it as a positive number.
+
+The fix is just to cast the val as an int, and print it as a %d,
+as in the sched:sched_switch tracepoint's "format".
+
+The output with the fix is:
+
+  # ./d &
+  # perf record -e sched:sched_switch -a sleep 1
+  # perf script
+      ...
+         swapper     0 [000]  4306.374037: sched:sched_switch: swapper/0:0 [120] R ==> d:10941 [-1]
+               d 10941 [000]  4306.383823: sched:sched_switch: d:10941 [-1] R ==> swapper/0:0 [120]
+
+[1] d.c
+
+ ---
+  #include <stdio.h>
+  #include <unistd.h>
+  #include <sys/syscall.h>
+  #include <linux/types.h>
+  #include <linux/sched.h>
+
+  struct sched_attr {
+       __u32 size, sched_policy;
+       __u64 sched_flags;
+       __s32 sched_nice;
+       __u32 sched_priority;
+       __u64 sched_runtime, sched_deadline, sched_period;
+  };
+
+  int sched_setattr(pid_t pid, const struct sched_attr *attr, unsigned int flags)
+  {
+       return syscall(__NR_sched_setattr, pid, attr, flags);
+  }
+
+  int main(void)
+  {
+       struct sched_attr attr = {
+               .size           = sizeof(attr),
+               .sched_policy   = SCHED_DEADLINE, /* This creates a 10ms/30ms reservation */
+               .sched_runtime  = 10 * 1000 * 1000,
+               .sched_period   = attr.sched_deadline = 30 * 1000 * 1000,
+       };
+
+       if (sched_setattr(0, &attr, 0) < 0) {
+               perror("sched_setattr");
+               return -1;
+       }
+
+       for(;;);
+  }
+ ---
+
+Committer notes:
+
+Got the program from the provided URL, http://bristot.me/lkml/d.c,
+trimmed it and included in the cset log above, so that we have
+everything needed to test it in one place.
+
+Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
+Acked-by: Steven Rostedt <rostedt@goodmis.org>
+Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lkml.kernel.org/r/866ef75bcebf670ae91c6a96daa63597ba981f0d.1483443552.git.bristot@redhat.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/lib/traceevent/plugin_sched_switch.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/lib/traceevent/plugin_sched_switch.c
++++ b/tools/lib/traceevent/plugin_sched_switch.c
+@@ -111,7 +111,7 @@ static int sched_switch_handler(struct t
+       trace_seq_printf(s, "%lld ", val);
+       if (pevent_get_field_val(s, event, "prev_prio", record, &val, 0) == 0)
+-              trace_seq_printf(s, "[%lld] ", val);
++              trace_seq_printf(s, "[%d] ", (int) val);
+       if (pevent_get_field_val(s,  event, "prev_state", record, &val, 0) == 0)
+               write_state(s, val);
+@@ -129,7 +129,7 @@ static int sched_switch_handler(struct t
+       trace_seq_printf(s, "%lld", val);
+       if (pevent_get_field_val(s, event, "next_prio", record, &val, 0) == 0)
+-              trace_seq_printf(s, " [%lld]", val);
++              trace_seq_printf(s, " [%d]", (int) val);
+       return 0;
+ }
diff --git a/queue-4.9/usb-dwc3-omap-fix-race-of-pm-runtime-with-irq-handler-in-probe.patch b/queue-4.9/usb-dwc3-omap-fix-race-of-pm-runtime-with-irq-handler-in-probe.patch
new file mode 100644 (file)
index 0000000..3ad4454
--- /dev/null
@@ -0,0 +1,83 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+Date: Mon, 12 Dec 2016 13:37:52 -0600
+Subject: usb: dwc3: omap: fix race of pm runtime with irq handler in probe
+
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+
+
+[ Upstream commit 12a7f17fac5b370bec87259e4c718faf563ce900 ]
+
+Now races can happen between interrupt handler execution and PM runtime in
+error handling code path in probe and in dwc3_omap_remove() which will lead
+to system crash:
+
+in probe:
+...
+ err1:
+       pm_runtime_put_sync(dev);
+^^ PM runtime can race with IRQ handler when deferred probing happening
+   due to extcon
+       pm_runtime_disable(dev);
+
+       return ret;
+
+in dwc3_omap_remove:
+...
+       dwc3_omap_disable_irqs(omap);
+^^ IRQs are disabled in HW, but handler may still run
+       of_platform_depopulate(omap->dev);
+       pm_runtime_put_sync(&pdev->dev);
+^^ PM runtime can race with IRQ handler
+       pm_runtime_disable(&pdev->dev);
+
+       return 0;
+
+So, OMAP DWC3 IRQ need to be disabled before calling
+pm_runtime_put() in probe and in dwc3_omap_remove().
+
+Acked-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/dwc3-omap.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/dwc3/dwc3-omap.c
++++ b/drivers/usb/dwc3/dwc3-omap.c
+@@ -19,6 +19,7 @@
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/slab.h>
++#include <linux/irq.h>
+ #include <linux/interrupt.h>
+ #include <linux/platform_device.h>
+ #include <linux/platform_data/dwc3-omap.h>
+@@ -511,7 +512,7 @@ static int dwc3_omap_probe(struct platfo
+       /* check the DMA Status */
+       reg = dwc3_omap_readl(omap->base, USBOTGSS_SYSCONFIG);
+-
++      irq_set_status_flags(omap->irq, IRQ_NOAUTOEN);
+       ret = devm_request_threaded_irq(dev, omap->irq, dwc3_omap_interrupt,
+                                       dwc3_omap_interrupt_thread, IRQF_SHARED,
+                                       "dwc3-omap", omap);
+@@ -532,7 +533,7 @@ static int dwc3_omap_probe(struct platfo
+       }
+       dwc3_omap_enable_irqs(omap);
+-
++      enable_irq(omap->irq);
+       return 0;
+ err2:
+@@ -553,6 +554,7 @@ static int dwc3_omap_remove(struct platf
+       extcon_unregister_notifier(omap->edev, EXTCON_USB, &omap->vbus_nb);
+       extcon_unregister_notifier(omap->edev, EXTCON_USB_HOST, &omap->id_nb);
+       dwc3_omap_disable_irqs(omap);
++      disable_irq(omap->irq);
+       of_platform_depopulate(omap->dev);
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
diff --git a/queue-4.9/usb-gadget-fix-copy-pasted-error-message.patch b/queue-4.9/usb-gadget-fix-copy-pasted-error-message.patch
new file mode 100644 (file)
index 0000000..caec34a
--- /dev/null
@@ -0,0 +1,35 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: David Lechner <david@lechnology.com>
+Date: Mon, 2 Jan 2017 17:28:39 -0600
+Subject: usb: gadget: Fix copy/pasted error message
+
+From: David Lechner <david@lechnology.com>
+
+
+[ Upstream commit 43aef5c2ca90535b3227e97e71604291875444ed ]
+
+This fixes an error message that was probably copied and pasted. The same
+message is used for both the in and out endpoints, so it makes it impossible
+to know which one actually failed because both cases say "IN".
+
+Make the out endpoint error message say "OUT".
+
+Signed-off-by: David Lechner <david@lechnology.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/function/f_hid.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/function/f_hid.c
++++ b/drivers/usb/gadget/function/f_hid.c
+@@ -582,7 +582,7 @@ static int hidg_set_alt(struct usb_funct
+               }
+               status = usb_ep_enable(hidg->out_ep);
+               if (status < 0) {
+-                      ERROR(cdev, "Enable IN endpoint FAILED!\n");
++                      ERROR(cdev, "Enable OUT endpoint FAILED!\n");
+                       goto fail;
+               }
+               hidg->out_ep->driver_data = hidg;
diff --git a/queue-4.9/xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch b/queue-4.9/xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch
new file mode 100644 (file)
index 0000000..40aec78
--- /dev/null
@@ -0,0 +1,51 @@
+From foo@baz Fri Aug  4 15:15:01 PDT 2017
+From: Jiandi An <anjiandi@codeaurora.org>
+Date: Tue, 27 Dec 2016 18:47:32 -0600
+Subject: Xen: ARM: Zero reserved fields of xatp before making hypervisor call
+
+From: Jiandi An <anjiandi@codeaurora.org>
+
+
+[ Upstream commit 0b47a6bd1150f4846b1d61925a4cc5a96593a541 ]
+
+Ensure all reserved fields of xatp are zero before making
+hypervisor call to XEN in xen_map_device_mmio().
+xenmem_add_to_physmap_one() in XEN fails the mapping request if
+extra.res reserved field in xatp is not zero for XENMAPSPACE_dev_mmio
+request.
+
+Signed-off-by: Jiandi An <anjiandi@codeaurora.org>
+Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
+Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/xen/arm-device.c |    8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/xen/arm-device.c
++++ b/drivers/xen/arm-device.c
+@@ -58,9 +58,13 @@ static int xen_map_device_mmio(const str
+       xen_pfn_t *gpfns;
+       xen_ulong_t *idxs;
+       int *errs;
+-      struct xen_add_to_physmap_range xatp;
+       for (i = 0; i < count; i++) {
++              struct xen_add_to_physmap_range xatp = {
++                      .domid = DOMID_SELF,
++                      .space = XENMAPSPACE_dev_mmio
++              };
++
+               r = &resources[i];
+               nr = DIV_ROUND_UP(resource_size(r), XEN_PAGE_SIZE);
+               if ((resource_type(r) != IORESOURCE_MEM) || (nr == 0))
+@@ -87,9 +91,7 @@ static int xen_map_device_mmio(const str
+                       idxs[j] = XEN_PFN_DOWN(r->start) + j;
+               }
+-              xatp.domid = DOMID_SELF;
+               xatp.size = nr;
+-              xatp.space = XENMAPSPACE_dev_mmio;
+               set_xen_guest_handle(xatp.gpfns, gpfns);
+               set_xen_guest_handle(xatp.idxs, idxs);
diff --git a/queue-4.9/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch b/queue-4.9/xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch
new file mode 100644 (file)
index 0000000..f187cc4
--- /dev/null
@@ -0,0 +1,64 @@
+From 4c86d77743a54fb2d8a4d18a037a074c892bb3be Mon Sep 17 00:00:00 2001
+From: Steffen Klassert <steffen.klassert@secunet.com>
+Date: Tue, 14 Feb 2017 07:43:56 +0100
+Subject: xfrm: Don't use sk_family for socket policy lookups
+
+From: Steffen Klassert <steffen.klassert@secunet.com>
+
+commit 4c86d77743a54fb2d8a4d18a037a074c892bb3be upstream.
+
+On IPv4-mapped IPv6 addresses sk_family is AF_INET6,
+but the flow informations are created based on AF_INET.
+So the routing set up 'struct flowi4' but we try to
+access 'struct flowi6' what leads to an out of bounds
+access. Fix this by using the family we get with the
+dst_entry, like we do it for the standard policy lookup.
+
+Reported-by: Dmitry Vyukov <dvyukov@google.com>
+Tested-by: Dmitry Vyukov <dvyukov@google.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/xfrm/xfrm_policy.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/net/xfrm/xfrm_policy.c
++++ b/net/xfrm/xfrm_policy.c
+@@ -1248,7 +1248,7 @@ static inline int policy_to_flow_dir(int
+ }
+ static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir,
+-                                               const struct flowi *fl)
++                                               const struct flowi *fl, u16 family)
+ {
+       struct xfrm_policy *pol;
+@@ -1256,8 +1256,7 @@ static struct xfrm_policy *xfrm_sk_polic
+  again:
+       pol = rcu_dereference(sk->sk_policy[dir]);
+       if (pol != NULL) {
+-              bool match = xfrm_selector_match(&pol->selector, fl,
+-                                               sk->sk_family);
++              bool match = xfrm_selector_match(&pol->selector, fl, family);
+               int err = 0;
+               if (match) {
+@@ -2206,7 +2205,7 @@ struct dst_entry *xfrm_lookup(struct net
+       sk = sk_const_to_full_sk(sk);
+       if (sk && sk->sk_policy[XFRM_POLICY_OUT]) {
+               num_pols = 1;
+-              pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl);
++              pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl, family);
+               err = xfrm_expand_policies(fl, family, pols,
+                                          &num_pols, &num_xfrms);
+               if (err < 0)
+@@ -2485,7 +2484,7 @@ int __xfrm_policy_check(struct sock *sk,
+       pol = NULL;
+       sk = sk_to_full_sk(sk);
+       if (sk && sk->sk_policy[dir]) {
+-              pol = xfrm_sk_policy_lookup(sk, dir, &fl);
++              pol = xfrm_sk_policy_lookup(sk, dir, &fl, family);
+               if (IS_ERR(pol)) {
+                       XFRM_INC_STATS(net, LINUX_MIB_XFRMINPOLERROR);
+                       return 0;