Hello community,

here is the log from the commit of package kernel-source for openSUSE:Factory 
checked in at 2017-09-17 22:27:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kernel-source (Old)
 and      /work/SRC/openSUSE:Factory/.kernel-source.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kernel-source"

Sun Sep 17 22:27:04 2017 rev:379 rq:526211 version:4.13.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/kernel-source/dtb-aarch64.changes        
2017-09-12 19:40:07.771853351 +0200
+++ /work/SRC/openSUSE:Factory/.kernel-source.new/dtb-aarch64.changes   
2017-09-17 22:27:09.302914462 +0200
@@ -1,0 +2,129 @@
+Thu Sep 14 20:35:54 CEST 2017 - [email protected]
+
+- Linux 4.13.2 (bnc#1012628 bsc#1055826).
+- Delete
+  patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips.
+- Delete
+  patches.fixes/Bluetooth-validate-output-buffer-length-for-config-r.patch.
+- commit 96d9efa
+
+-------------------------------------------------------------------
+Wed Sep 13 08:24:42 CEST 2017 - [email protected]
+
+- Bluetooth: validate output buffer length for config requests
+  and responses (bnc#1057389 CVE-2017-1000251).
+- commit c0b7e1f
+
+-------------------------------------------------------------------
+Tue Sep 12 14:57:54 CEST 2017 - [email protected]
+
+- fix annotations of xen-head.S (bnc#1058115).
+- commit d4c88a5
+
+-------------------------------------------------------------------
+Tue Sep 12 13:51:53 CEST 2017 - [email protected]
+
+- x86/head: Add unwind hint annotations (bnc#1058115).
+- x86/xen: Add unwind hint annotations (bnc#1058115).
+- x86/xen: Fix xen head ELF annotations (bnc#1058115).
+- x86/boot: Annotate verify_cpu() as a callable function
+  (bnc#1058115).
+- x86/head: Fix head ELF function annotations (bnc#1058115).
+- x86/head: Remove unused 'bad_address' code (bnc#1058115).
+- x86/head: Remove confusing comment (bnc#1058115).
+- objtool: Don't report end of section error after an empty
+  unwind hint (bnc#1058115).
+- commit 53af152
+
+-------------------------------------------------------------------
+Tue Sep 12 13:26:40 CEST 2017 - [email protected]
+
+- objtool: Assume unannotated UD2 instructions are dead ends
+  (bnc#1058115).
+- objtool: Fix gcov check for older versions of GCC (bnc#1058115).
+- objtool: Fix objtool fallthrough detection with function padding
+  (bnc#1058115).
+- objtool: Fix validate_branch() return codes (bnc#1058115).
+- objtool: Handle GCC stack pointer adjustment bug (bnc#1058115).
+- x86/asm: Add ASM_UNREACHABLE (bnc#1058115).
+- x86/asm: Fix UNWIND_HINT_REGS macro for older binutils
+  (bnc#1058115).
+- x86/asm: Make objtool unreachable macros independent from GCC
+  version (bnc#1058115).
+- objtool: Skip unreachable warnings for 'alt' instructions
+  (bnc#1058115).
+- objtool: Track DRAP separately from callee-saved registers
+  (bnc#1058115).
+- Refresh patches.suse/0001-x86-unwind-Add-the-ORC-unwinder.patch.
+  Take all ORC upstream patches. This will go to stable & SLE15 too.
+- commit 831ca01
+
+-------------------------------------------------------------------
+Mon Sep 11 15:54:48 CEST 2017 - [email protected]
+
+- Refresh
+  patches.suse/0001-x86-entry-64-Refactor-IRQ-stacks-and-make-them-NMI-s.patch.
+- Refresh patches.suse/0001-x86-unwind-Add-the-ORC-unwinder.patch.
+- Refresh
+  patches.suse/0002-x86-entry-64-Initialize-the-top-of-the-IRQ-stack-bef.patch.
+- Refresh
+  patches.suse/0002-x86-kconfig-Make-it-easier-to-switch-to-the-new-ORC-.patch.
+- Refresh
+  patches.suse/0003-x86-dumpstack-Fix-occasionally-missing-registers.patch.
+- Refresh
+  patches.suse/0003-x86-kconfig-Consolidate-unwinders-into-multiple-choi.patch.
+- Refresh
+  patches.suse/0004-x86-dumpstack-Fix-interrupt-and-exception-stack-boun.patch.
+- Refresh
+  patches.suse/0005-objtool-Add-ORC-unwind-table-generation.patch.
+- Refresh
+  patches.suse/0006-objtool-x86-Add-facility-for-asm-code-to-provide-unw.patch.
+- Refresh
+  patches.suse/0007-x86-entry-64-Add-unwind-hint-annotations.patch.
+- Refresh
+  patches.suse/0008-x86-asm-Add-unwind-hint-annotations-to-sync_core.patch.
+- Delete
+  patches.suse/0001-linkage-new-macros-for-assembler-symbols.patch.
+- Delete
+  patches.suse/0003-DWARF-EH-frame-based-stack-unwinding.patch.
+- Delete patches.suse/stack-unwind-disable-kasan.patch.
+  Update upstream status of ORC and drop already-disabled DWARF unwinder.
+- commit 2e9b944
+
+-------------------------------------------------------------------
+Mon Sep 11 09:47:41 CEST 2017 - [email protected]
+
+- rpm/constraints.in: build ARM on at least 2 cpus
+- commit b7edeaf
+
+-------------------------------------------------------------------
+Mon Sep 11 08:01:37 CEST 2017 - [email protected]
+
+- rpm/constraints.in: increase memory for kernel-syzkaller
+  And see if it helps. If so, push it to packaging...
+- commit 7193e65
+
+-------------------------------------------------------------------
+Sun Sep 10 18:56:35 CEST 2017 - [email protected]
+
+- config: arm64: Enable legacy instruction emulation (boo#1029158)
+  Needed for execution of older e.g. ARMv6 code.
+- commit a4e05e8
+
+-------------------------------------------------------------------
+Sun Sep 10 17:13:16 CEST 2017 - [email protected]
+
+- config: arm64: Enable ACPI_DOCK for consistency
+- commit cec354f
+
+-------------------------------------------------------------------
+Sun Sep 10 17:12:20 CEST 2017 - [email protected]
+
+- config: arm64: Enable some network options
+- Marvell Armada 7K/8K Ethernet driver
+- Microchip ENC28J60 and related SPI Ethernet drivers
+- Micrel KS8851 SPI Ethernet driver
+- MMIO MDIO mux driver
+- commit cf926f4
+
+-------------------------------------------------------------------
@@ -14 +143 @@
-- commit 847b81f
+- commit 8740849
@@ -30,0 +160,6 @@
+Thu Sep  7 18:00:00 CEST 2017 - [email protected]
+
+- rpm/kernel-docs.spec.in: Expand kernel tree directly from sources 
(bsc#1057199)
+- commit a61b4d9
+
+-------------------------------------------------------------------
@@ -36,0 +172,17 @@
+Wed Sep  6 20:33:16 CEST 2017 - [email protected]
+
+- rpm/kernel-docs.spec.in: Re-add xmlto buildreq conditionally for SLE15 & co
+- commit 259b49e
+
+-------------------------------------------------------------------
+Wed Sep  6 13:18:40 CEST 2017 - [email protected]
+
+- rpm/group-source-files.pl: Add arch/*/tools/* files to the devel package
+  Commit b71c9ffb1405 ("powerpc: Add arch/powerpc/tools directory")
+  introduced in v4.12-rc1 release, moved the scripts into the tools
+  directory. However, this location is not considered for the kernel devel
+  package and the following error occurs when building a kmp for powerpc
+  make[2]: 
/usr/src/linux-4.12.9-1/arch/powerpc/tools/gcc-check-mprofile-kernel.sh: 
Command not found
+- commit 5f1ff53
+
+-------------------------------------------------------------------
@@ -110 +262 @@
-- commit d3a32e7
+- commit 9f682b5
@@ -286 +438 @@
-- commit e18c03e
+- commit c117a0c
@@ -504 +656 @@
-- commit 15f6013
+- commit e47dc84
@@ -510 +662 @@
-- commit abcbb37
+- commit 697b763
@@ -518 +670 @@
-- commit bc7da46
+- commit ead44a1
@@ -706 +858 @@
-- commit c9542b9
+- commit 8e7de10
dtb-armv6l.changes: same change
dtb-armv7l.changes: same change
kernel-64kb.changes: same change
kernel-debug.changes: same change
kernel-default.changes: same change
kernel-docs.changes: same change
kernel-lpae.changes: same change
kernel-obs-build.changes: same change
kernel-obs-qa.changes: same change
kernel-pae.changes: same change
kernel-source.changes: same change
kernel-syms.changes: same change
kernel-syzkaller.changes: same change
kernel-vanilla.changes: same change
kernel-zfcpdump.changes: same change

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dtb-aarch64.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.066103625 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.070103063 +0200
@@ -17,7 +17,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 
 %include %_sourcedir/kernel-spec-macros
@@ -29,9 +29,9 @@
 %(chmod +x 
%_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb})
 
 Name:           dtb-aarch64
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

dtb-armv6l.spec: same change
dtb-armv7l.spec: same change
++++++ kernel-64kb.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.138093497 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.138093497 +0200
@@ -18,7 +18,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -58,9 +58,9 @@
 Summary:        Kernel with 64kb PAGE_SIZE
 License:        GPL-2.0
 Group:          System/Kernel
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

kernel-debug.spec: same change
kernel-default.spec: same change
++++++ kernel-docs.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.246078304 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.246078304 +0200
@@ -16,7 +16,8 @@
 #
 
 
-%define patchversion 4.13.1
+%define srcversion 4.13
+%define patchversion 4.13.2
 %define variant %{nil}
 
 %include %_sourcedir/kernel-spec-macros
@@ -24,26 +25,22 @@
 %define build_html 1
 %define build_pdf 0
 
-# copy the whole tree to generate some images (sigh...)
-%define local_copy 1
-%if %local_copy
-%define linux_src .
-%else
-%define linux_src /usr/src/linux%variant
-%define make_arg "-C %linux_src"
-%endif
+%(chmod +x 
%_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb})
 
 Name:           kernel-docs
 Summary:        Kernel Documentation
 License:        GPL-2.0
 Group:          Documentation/Man
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif
-BuildRequires:  kernel-source%variant
+# TW (4.13 or later) no longer needs xmlto
+%if !0%{?sle_version}
+BuildRequires:  xmlto
+%endif
 %if %build_pdf || %build_html
 # ReST handling
 BuildRequires:  graphviz
@@ -68,7 +65,131 @@
 Provides:       %name = %version-%source_rel
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source:         kernel-spec-macros
+Source0:        
http://www.kernel.org/pub/linux/kernel/v4.x/linux-%srcversion.tar.xz
+Source2:        source-post.sh
+Source3:        kernel-source.rpmlintrc
+Source8:        devel-pre.sh
+Source9:        devel-post.sh
+Source10:       preun.sh
+Source11:       postun.sh
+Source12:       pre.sh
+Source13:       post.sh
+Source14:       series.conf
+Source16:       guards
+Source17:       apply-patches
+Source21:       config.conf
+Source23:       supported.conf
+Source33:       check-for-config-changes
+Source35:       group-source-files.pl
+Source36:       README.PATCH-POLICY.SUSE
+Source37:       README.SUSE
+Source38:       README.KSYMS
+Source39:       config-options.changes.txt
+Source40:       source-timestamp
+Source46:       split-modules
+Source47:       modversions
+Source48:       macros.kernel-source
+Source49:       kernel-module-subpackage
+Source50:       kabi.pl
+Source51:       mkspec
+Source52:       kernel-source%variant.changes
+Source53:       kernel-source.spec.in
+Source54:       kernel-binary.spec.in
+Source55:       kernel-syms.spec.in
+Source56:       kernel-docs.spec.in
+Source57:       kernel-cert-subpackage
+Source58:       constraints.in
+Source60:       config.sh
+Source61:       compute-PATCHVERSION.sh
+Source62:       old-flavors
+Source63:       arch-symbols
+Source64:       package-descriptions
+Source65:       kernel-spec-macros
+Source67:       log.sh
+Source68:       host-memcpy-hack.h
+Source69:       try-disable-staging-driver
+Source70:       kernel-obs-build.spec.in
+Source71:       kernel-obs-qa.spec.in
+Source72:       compress-vmlinux.sh
+Source73:       dtb.spec.in.in
+Source74:       mkspec-dtb
+Source100:      config.tar.bz2
+Source101:      config.addon.tar.bz2
+Source102:      patches.arch.tar.bz2
+Source103:      patches.drivers.tar.bz2
+Source104:      patches.fixes.tar.bz2
+Source105:      patches.rpmify.tar.bz2
+Source106:      patches.suse.tar.bz2
+Source108:      patches.addon.tar.bz2
+Source109:      patches.kernel.org.tar.bz2
+Source110:      patches.apparmor.tar.bz2
+Source111:      patches.rt.tar.bz2
+Source113:      patches.kabi.tar.bz2
+Source120:      kabi.tar.bz2
+Source121:      sysctl.tar.bz2
+# These files are found in the kernel-source package:
+NoSource:       0
+NoSource:       2
+NoSource:       3
+NoSource:       8
+NoSource:       9
+NoSource:       10
+NoSource:       11
+NoSource:       12
+NoSource:       13
+NoSource:       14
+NoSource:       16
+NoSource:       17
+NoSource:       21
+NoSource:       23
+NoSource:       33
+NoSource:       35
+NoSource:       36
+NoSource:       37
+NoSource:       38
+NoSource:       39
+NoSource:       40
+NoSource:       46
+NoSource:       47
+NoSource:       48
+NoSource:       49
+NoSource:       50
+NoSource:       51
+NoSource:       52
+NoSource:       53
+NoSource:       54
+NoSource:       55
+NoSource:       56
+NoSource:       57
+NoSource:       58
+NoSource:       60
+NoSource:       61
+NoSource:       62
+NoSource:       63
+NoSource:       64
+NoSource:       65
+NoSource:       67
+NoSource:       68
+NoSource:       69
+NoSource:       70
+NoSource:       71
+NoSource:       72
+NoSource:       73
+NoSource:       74
+NoSource:       100
+NoSource:       101
+NoSource:       102
+NoSource:       103
+NoSource:       104
+NoSource:       105
+NoSource:       106
+NoSource:       108
+NoSource:       109
+NoSource:       110
+NoSource:       111
+NoSource:       113
+NoSource:       120
+NoSource:       121
 
 %description
 A few basic documents from the current kernel sources.
@@ -98,13 +219,13 @@
 %endif
 
 %prep
-%setup -T -c
-%if %local_copy
-# FIXME: need to copy locally to generate some images...
-cp -a /usr/src/linux%variant/* .
-%endif
+%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 108 
-a 109 -a 110 -a 111 -a 113 -a 120 -a 121
+cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README} .
+cd linux-%srcversion
+%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
 
 %build
+cd linux-%srcversion
 export LANG=en_US
 %if %build_html
 mkdir -p html
@@ -116,6 +237,7 @@
 %endif
 
 %install
+cd linux-%srcversion
 %if %build_html
 install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst
 cp -a html/Documentation/output/* 
$RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst || true
@@ -128,10 +250,6 @@
 done
 %endif
 
-%if !%local_copy
-cp -a %linux_src/{COPYING,CREDITS,MAINTAINERS,README} .
-%endif
-
 %files
 %defattr(-,root,root)
 %doc COPYING CREDITS MAINTAINERS README

++++++ kernel-lpae.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.270074928 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.274074365 +0200
@@ -18,7 +18,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -58,9 +58,9 @@
 Summary:        Kernel for LPAE enabled systems
 License:        GPL-2.0
 Group:          System/Kernel
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-obs-build.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.302070427 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.302070427 +0200
@@ -19,7 +19,7 @@
 
 #!BuildIgnore: post-build-checks
 
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -57,9 +57,9 @@
 Summary:        package kernel and initrd for OBS VM builds
 License:        GPL-2.0
 Group:          SLES
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-obs-qa.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.322067613 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.326067051 +0200
@@ -17,7 +17,7 @@
 # needsrootforbuild
 
 
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 
 %include %_sourcedir/kernel-spec-macros
@@ -36,9 +36,9 @@
 Summary:        Basic QA tests for the kernel
 License:        GPL-2.0
 Group:          SLES
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-pae.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.346064237 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.350063674 +0200
@@ -18,7 +18,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -58,9 +58,9 @@
 Summary:        Kernel with PAE Support
 License:        GPL-2.0
 Group:          System/Kernel
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-source.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.366061423 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.370060861 +0200
@@ -18,7 +18,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -30,9 +30,9 @@
 Summary:        The Linux Kernel Sources
 License:        GPL-2.0
 Group:          Development/Sources
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-syms.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.394057485 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.398056922 +0200
@@ -24,10 +24,10 @@
 Summary:        Kernel Symbol Versions (modversions)
 License:        GPL-2.0
 Group:          Development/Sources
-Version:        4.13.1
+Version:        4.13.2
 %if %using_buildservice
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

++++++ kernel-syzkaller.spec ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.422053546 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.426052983 +0200
@@ -18,7 +18,7 @@
 
 
 %define srcversion 4.13
-%define patchversion 4.13.1
+%define patchversion 4.13.2
 %define variant %{nil}
 %define vanilla_only 0
 
@@ -58,9 +58,9 @@
 Summary:        Kernel used for fuzzing by syzkaller
 License:        GPL-2.0
 Group:          System/Kernel
-Version:        4.13.1
+Version:        4.13.2
 %if 0%{?is_kotd}
-Release:        <RELEASE>.g0d725b5
+Release:        <RELEASE>.g68f4aee
 %else
 Release:        0
 %endif

kernel-vanilla.spec: same change
kernel-zfcpdump.spec: same change
++++++ _constraints ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.626024849 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.630024286 +0200
@@ -108,6 +108,26 @@
     </hardware>
   </overwrite>
 
+  <!-- 2 CPUs for binary packages on ARM -->
+  <overwrite>
+    <conditions>
+      <arch>aarch64</arch>
+      <arch>armv6l</arch>
+      <arch>armv7l</arch>
+<package>kernel-64kb</package>
+<package>kernel-debug</package>
+<package>kernel-default</package>
+<package>kernel-lpae</package>
+<package>kernel-pae</package>
+<package>kernel-syzkaller</package>
+<package>kernel-vanilla</package>
+<package>kernel-zfcpdump</package>
+    </conditions>
+    <hardware>
+      <processors>2</processors>
+    </hardware>
+  </overwrite>
+
   <overwrite>
     <conditions>
       <arch>i586</arch>

++++++ config.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/config/arm64/default new/config/arm64/default
--- old/config/arm64/default    2017-09-05 20:41:12.000000000 +0200
+++ new/config/arm64/default    2017-09-10 21:49:33.000000000 +0200
@@ -614,7 +614,10 @@
 CONFIG_CRASH_DUMP=y
 # CONFIG_XEN is not set
 CONFIG_FORCE_MAX_ZONEORDER=11
-# CONFIG_ARMV8_DEPRECATED is not set
+CONFIG_ARMV8_DEPRECATED=y
+CONFIG_SWP_EMULATION=y
+CONFIG_CP15_BARRIER_EMULATION=y
+CONFIG_SETEND_EMULATION=y
 # CONFIG_ARM64_SW_TTBR0_PAN is not set
 
 #
@@ -2647,7 +2650,7 @@
 CONFIG_NET_VENDOR_MARVELL=y
 CONFIG_MVMDIO=m
 CONFIG_MVNETA=m
-# CONFIG_MVPP2 is not set
+CONFIG_MVPP2=m
 # CONFIG_PXA168_ETH is not set
 CONFIG_SKGE=m
 # CONFIG_SKGE_DEBUG is not set
@@ -2680,10 +2683,13 @@
 CONFIG_MLXFW=m
 CONFIG_NET_VENDOR_MICREL=y
 CONFIG_KS8842=m
-# CONFIG_KS8851 is not set
+CONFIG_KS8851=m
 CONFIG_KS8851_MLL=m
 CONFIG_KSZ884X_PCI=m
-# CONFIG_NET_VENDOR_MICROCHIP is not set
+CONFIG_NET_VENDOR_MICROCHIP=y
+CONFIG_ENC28J60=m
+# CONFIG_ENC28J60_WRITEVERIFY is not set
+CONFIG_ENCX24J600=m
 CONFIG_NET_VENDOR_MYRI=y
 CONFIG_MYRI10GE=m
 CONFIG_FEALNX=m
@@ -2809,7 +2815,7 @@
 CONFIG_MDIO_BUS_MUX=m
 CONFIG_MDIO_BUS_MUX_BCM_IPROC=m
 CONFIG_MDIO_BUS_MUX_GPIO=m
-# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
+CONFIG_MDIO_BUS_MUX_MMIOREG=m
 CONFIG_MDIO_CAVIUM=m
 CONFIG_MDIO_GPIO=m
 CONFIG_MDIO_HISI_FEMAC=m
@@ -2855,7 +2861,7 @@
 CONFIG_TERANETICS_PHY=m
 CONFIG_VITESSE_PHY=m
 CONFIG_XILINX_GMII2RGMII=m
-# CONFIG_MICREL_KS8995MA is not set
+CONFIG_MICREL_KS8995MA=m
 CONFIG_PLIP=m
 CONFIG_PPP=m
 CONFIG_PPP_BSDCOMP=m
@@ -7987,7 +7993,7 @@
 # CONFIG_ACPI_EC_DEBUGFS is not set
 CONFIG_ACPI_BUTTON=y
 CONFIG_ACPI_FAN=y
-# CONFIG_ACPI_DOCK is not set
+CONFIG_ACPI_DOCK=y
 CONFIG_ACPI_PROCESSOR_IDLE=y
 CONFIG_ACPI_MCFG=y
 CONFIG_ACPI_PROCESSOR=y

++++++ constraints.in ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:15.973975895 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:15.973975895 +0200
@@ -80,6 +80,19 @@
     </hardware>
   </overwrite>
 
+  <!-- 2 CPUs for binary packages on ARM -->
+  <overwrite>
+    <conditions>
+      <arch>aarch64</arch>
+      <arch>armv6l</arch>
+      <arch>armv7l</arch>
+@BINARY_PACKAGES_XML@
+    </conditions>
+    <hardware>
+      <processors>2</processors>
+    </hardware>
+  </overwrite>
+
   <overwrite>
     <conditions>
       <arch>i586</arch>

++++++ group-source-files.pl ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:16.053964641 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:16.057964078 +0200
@@ -40,6 +40,7 @@
                        m{^\Q$loc\E/arch/arm/[^/]+/include/mach\b} ||
                        m{^\Q$loc\E/arch/arm/[^/]+/include/plat\b} ||
                        m{^\Q$loc\E/arch/[^/]+/scripts\b} ||
+                       m{^\Q$loc\E/arch/[^/]+/tools\b} ||
                        m{^\Q$loc\E/include/[^/]+\b} ||
                        m{^\Q$loc\E/scripts\b};
                if (substr($_, 0, 1) ne "/") {

++++++ kernel-docs.spec.in ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:16.173947760 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:16.173947760 +0200
@@ -16,6 +16,7 @@
 #
 
 
+%define srcversion @SRCVERSION@
 %define patchversion @PATCHVERSION@
 %define variant @VARIANT@%{nil}
 
@@ -24,14 +25,7 @@
 %define build_html 1
 %define build_pdf 0
 
-# copy the whole tree to generate some images (sigh...)
-%define local_copy 1
-%if %local_copy
-%define linux_src .
-%else
-%define linux_src /usr/src/linux%variant
-%define make_arg "-C %linux_src"
-%endif
+%(chmod +x %_sourcedir/{@SCRIPTS@})
 
 Name:           kernel-docs@VARIANT@
 Summary:        Kernel Documentation
@@ -43,7 +37,10 @@
 %else
 Release:        @RELEASE@
 %endif
-BuildRequires:  kernel-source%variant
+# TW (4.13 or later) no longer needs xmlto
+%if !0%{?sle_version}
+BuildRequires:  xmlto
+%endif
 %if %build_pdf || %build_html
 # ReST handling
 BuildRequires:  graphviz
@@ -68,7 +65,9 @@
 Provides:       %name = %version-%source_rel
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source:         kernel-spec-macros
+@SOURCES@
+# These files are found in the kernel-source package:
+@NOSOURCE@
 
 %description
 A few basic documents from the current kernel sources.
@@ -98,13 +97,13 @@
 %endif
 
 %prep
-%setup -T -c
-%if %local_copy
-# FIXME: need to copy locally to generate some images...
-cp -a /usr/src/linux%variant/* .
-%endif
+%setup -q -c -T -a 0 @UNPACK_PATCHES@
+cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README} .
+cd linux-%srcversion
+%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
 
 %build
+cd linux-%srcversion
 export LANG=en_US
 %if %build_html
 mkdir -p html
@@ -116,6 +115,7 @@
 %endif
 
 %install
+cd linux-%srcversion
 %if %build_html
 install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst
 cp -a html/Documentation/output/* 
$RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst || true
@@ -128,10 +128,6 @@
 done
 %endif
 
-%if !%local_copy
-cp -a %linux_src/{COPYING,CREDITS,MAINTAINERS,README} .
-%endif
-
 %files
 %defattr(-,root,root)
 %doc COPYING CREDITS MAINTAINERS README

++++++ patches.drivers.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips 
new/patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips
--- old/patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips      
2017-09-07 13:19:07.000000000 +0200
+++ new/patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips      
1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-From: Stanislaw Gruszka <[email protected]>
-Date: Fri, 25 Aug 2017 17:04:15 +0200
-Subject: [PATCH] rt2800: fix TX_PIN_CFG setting for non MT7620 chips
-Git-repo: 
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git
-Patch-mainline: Queued in subsystem maintainer repository
-Git-commit: 83ec489193894e52bd395eec470f4f7c4286d4a5
-References: bsc#1055826
-
-Since commit 41977e86c984 ("rt2x00: add support for MT7620") we do not
-initialize TX_PIN_CFG setting. This cause breakage at least on some
-RT3573 devices. To fix the problem patch restores previous behaviour
-for non MT7620 chips.
-
-Fixes: 41977e86c984 ("rt2x00: add support for MT7620")
-Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1480829
-Reported-and-tested-by: Jussi Eloranta <[email protected]>
-Cc: Daniel Golle <[email protected]>
-Signed-off-by: Stanislaw Gruszka <[email protected]>
-Acked-by: Daniel Golle <[email protected]>
-Signed-off-by: Kalle Valo <[email protected]>
-Signed-off-by: Takashi Iwai <[email protected]>
-
----
- drivers/net/wireless/ralink/rt2x00/rt2800lib.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
-@@ -3702,7 +3702,10 @@ static void rt2800_config_channel(struct
-       if (rt2x00_rt(rt2x00dev, RT3572))
-               rt2800_rfcsr_write(rt2x00dev, 8, 0);
- 
--      tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
-+      if (rt2x00_rt(rt2x00dev, RT6352))
-+              tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
-+      else
-+              tx_pin = 0;
- 
-       switch (rt2x00dev->default_ant.tx_chain_num) {
-       case 3:

++++++ patches.fixes.tar.bz2 ++++++

++++++ patches.kernel.org.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/patches.kernel.org/patch-4.13.1-2 
new/patches.kernel.org/patch-4.13.1-2
--- old/patches.kernel.org/patch-4.13.1-2       1970-01-01 01:00:00.000000000 
+0100
+++ new/patches.kernel.org/patch-4.13.1-2       2017-09-14 20:35:54.000000000 
+0200
@@ -0,0 +1,1377 @@
+From: Jiri Slaby <[email protected]>
+Subject: Linux 4.13.2
+Patch-mainline: 4.13.2
+References: bnc#1012628 bsc#1055826
+Git-commit: b31ff3cdf540110da4572e3e29bd172087af65cc
+Git-commit: 14abcb0bf59a30cf65a74f6c6f53974cd7224bc6
+Git-commit: e973b1a5999e57da677ab50da5f5479fdc0f0c31
+Git-commit: 196639ebbe63a037fe9a80669140bd292d8bcd80
+Git-commit: 746a272e44141af24a02f6c9b0f65f4c4598ed42
+Git-commit: 95696d292e204073433ed2ef3ff4d3d8f42a8248
+Git-commit: e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
+Git-commit: 83ec489193894e52bd395eec470f4f7c4286d4a5
+Git-commit: f007cad159e99fa2acd3b2e9364fbb32ad28b971
+Git-commit: 64531a3b70b17c8d3e77f2e49e5e1bb70f571266
+Git-commit: de0c799bba2610a8e1e9a50d76a28614520a4cd4
+Git-commit: b4ccec41af82b5a5518c6534444412961894f07c
+Git-commit: b6b1fd2a6bedd533aeed83924d7be0e944fded9f
+Git-commit: 8606a1a94da5c4e49c0fb28af62d2e75c6747716
+Git-commit: 23d98c204386a98d9ef9f9e744f41443ece4929f
+Git-commit: df9c011c0a23cf1399c01f896cd359d932ab49b5
+Git-commit: 98b74e1f31045a63f6148b2d129ca9bf244e24ab
+Git-commit: f957dd3c8db2781c8a334b166800788feb618625
+Git-commit: bc9ae2247ac92fd4d962507bafa3afffff6660ff
+Git-commit: 6d622692836950b3c943776f84c4557ff6c02f3b
+Git-commit: a33fcba6ec01efcca33b1afad91057020f247f15
+Git-commit: 6c6b5a39c4bf3dbd8cf629c9f5450e983c19dbb9
+Git-commit: 40a5fce495715c48c2e02668144e68a507ac5a30
+Git-commit: 10777de570016471fd929869c7830a7772893e39
+Git-commit: d8a9b320a26c1ea28e51e4f3ecfb593d5aac2910
+Git-commit: 3bff08dffe3115a25ce04b95ea75f6d868572c60
+Git-commit: fd213b5bae800dc00a2930dcd07f63ab9bbff3f9
+Git-commit: 69fc01296c92814b62dbfba1600fe7ed2ed304f5
+
+Signed-off-by: Jiri Slaby <[email protected]>
+---
+diff --git a/Documentation/driver-api/firmware/request_firmware.rst 
b/Documentation/driver-api/firmware/request_firmware.rst
+index 1c2c4967cd43..cc0aea880824 100644
+--- a/Documentation/driver-api/firmware/request_firmware.rst
++++ b/Documentation/driver-api/firmware/request_firmware.rst
+@@ -44,17 +44,6 @@ request_firmware_nowait
+ .. kernel-doc:: drivers/base/firmware_class.c
+    :functions: request_firmware_nowait
+ 
+-Considerations for suspend and resume
+-=====================================
+-
+-During suspend and resume only the built-in firmware and the firmware cache
+-elements of the firmware API can be used. This is managed by fw_pm_notify().
+-
+-fw_pm_notify
+-------------
+-.. kernel-doc:: drivers/base/firmware_class.c
+-   :functions: fw_pm_notify
+-
+ request firmware API expected driver use
+ ========================================
+ 
+diff --git a/Makefile b/Makefile
+index 41a976854cad..8aad6bc50d52 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 13
+-SUBLEVEL = 1
++SUBLEVEL = 2
+ EXTRAVERSION =
+ NAME = Fearless Coyote
+ 
+diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
+index ff8b0aa2dfde..42f585379e19 100644
+--- a/arch/arm/mm/fault.c
++++ b/arch/arm/mm/fault.c
+@@ -315,8 +315,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, 
struct pt_regs *regs)
+        * signal first. We do not need to release the mmap_sem because
+        * it would already be released in __lock_page_or_retry in
+        * mm/filemap.c. */
+-      if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
++      if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
++              if (!user_mode(regs))
++                      goto no_context;
+               return 0;
++      }
+ 
+       /*
+        * Major/minor page fault accounting is only done on the
+diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi 
b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+index 51763d674050..a92ac63addf0 100644
+--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+@@ -323,6 +323,7 @@
+                               interrupt-controller;
+                               reg = <0x1d00000 0x10000>, /* GICD */
+                                     <0x1d40000 0x40000>; /* GICR */
++                              interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+               };
+ 
+diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
+index 9b1dd114956a..56e68dfac974 100644
+--- a/arch/x86/kvm/mmu.c
++++ b/arch/x86/kvm/mmu.c
+@@ -4839,7 +4839,8 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, 
u64 error_code,
+        * Note: AMD only (since it supports the PFERR_GUEST_PAGE_MASK used
+        *       in PFERR_NEXT_GUEST_PAGE)
+        */
+-      if (error_code == PFERR_NESTED_GUEST_PAGE) {
++      if (vcpu->arch.mmu.direct_map &&
++              error_code == PFERR_NESTED_GUEST_PAGE) {
+               kvm_mmu_unprotect_page(vcpu->kvm, gpa_to_gfn(cr2));
+               return 1;
+       }
+diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
+index bfbe1e154128..19b63d20f5d3 100644
+--- a/drivers/base/firmware_class.c
++++ b/drivers/base/firmware_class.c
+@@ -256,38 +256,6 @@ static int fw_cache_piggyback_on_request(const char 
*name);
+  * guarding for corner cases a global lock should be OK */
+ static DEFINE_MUTEX(fw_lock);
+ 
+-static bool __enable_firmware = false;
+-
+-static void enable_firmware(void)
+-{
+-      mutex_lock(&fw_lock);
+-      __enable_firmware = true;
+-      mutex_unlock(&fw_lock);
+-}
+-
+-static void disable_firmware(void)
+-{
+-      mutex_lock(&fw_lock);
+-      __enable_firmware = false;
+-      mutex_unlock(&fw_lock);
+-}
+-
+-/*
+- * When disabled only the built-in firmware and the firmware cache will be
+- * used to look for firmware.
+- */
+-static bool firmware_enabled(void)
+-{
+-      bool enabled = false;
+-
+-      mutex_lock(&fw_lock);
+-      if (__enable_firmware)
+-              enabled = true;
+-      mutex_unlock(&fw_lock);
+-
+-      return enabled;
+-}
+-
+ static struct firmware_cache fw_cache;
+ 
+ static struct firmware_buf *__allocate_fw_buf(const char *fw_name,
+@@ -1239,12 +1207,6 @@ _request_firmware(const struct firmware **firmware_p, 
const char *name,
+       if (ret <= 0) /* error or already assigned */
+               goto out;
+ 
+-      if (!firmware_enabled()) {
+-              WARN(1, "firmware request while host is not available\n");
+-              ret = -EHOSTDOWN;
+-              goto out;
+-      }
+-
+       ret = fw_get_filesystem_firmware(device, fw->priv);
+       if (ret) {
+               if (!(opt_flags & FW_OPT_NO_WARN))
+@@ -1755,62 +1717,6 @@ static void device_uncache_fw_images_delay(unsigned 
long delay)
+                          msecs_to_jiffies(delay));
+ }
+ 
+-/**
+- * fw_pm_notify - notifier for suspend/resume
+- * @notify_block: unused
+- * @mode: mode we are switching to
+- * @unused: unused
+- *
+- * Used to modify the firmware_class state as we move in between states.
+- * The firmware_class implements a firmware cache to enable device driver
+- * to fetch firmware upon resume before the root filesystem is ready. We
+- * disable API calls which do not use the built-in firmware or the firmware
+- * cache when we know these calls will not work.
+- *
+- * The inner logic behind all this is a bit complex so it is worth summarizing
+- * the kernel's own suspend/resume process with context and focus on how this
+- * can impact the firmware API.
+- *
+- * First a review on how we go to suspend::
+- *
+- *    pm_suspend() --> enter_state() -->
+- *    sys_sync()
+- *    suspend_prepare() -->
+- *            __pm_notifier_call_chain(PM_SUSPEND_PREPARE, ...);
+- *            suspend_freeze_processes() -->
+- *                    freeze_processes() -->
+- *                            
__usermodehelper_set_disable_depth(UMH_DISABLED);
+- *                            freeze all tasks ...
+- *                    freeze_kernel_threads()
+- *    suspend_devices_and_enter() -->
+- *            dpm_suspend_start() -->
+- *                            dpm_prepare()
+- *                            dpm_suspend()
+- *            suspend_enter()  -->
+- *                    platform_suspend_prepare()
+- *                    dpm_suspend_late()
+- *                    freeze_enter()
+- *                    syscore_suspend()
+- *
+- * When we resume we bail out of a loop from suspend_devices_and_enter() and
+- * unwind back out to the caller enter_state() where we were before as 
follows::
+- *
+- *    enter_state() -->
+- *    suspend_devices_and_enter() --> (bail from loop)
+- *            dpm_resume_end() -->
+- *                    dpm_resume()
+- *                    dpm_complete()
+- *    suspend_finish() -->
+- *            suspend_thaw_processes() -->
+- *                    thaw_processes() -->
+- *                            
__usermodehelper_set_disable_depth(UMH_FREEZING);
+- *                            thaw_workqueues();
+- *                            thaw all processes ...
+- *                            usermodehelper_enable();
+- *            pm_notifier_call_chain(PM_POST_SUSPEND);
+- *
+- * fw_pm_notify() works through pm_notifier_call_chain().
+- */
+ static int fw_pm_notify(struct notifier_block *notify_block,
+                       unsigned long mode, void *unused)
+ {
+@@ -1824,7 +1730,6 @@ static int fw_pm_notify(struct notifier_block 
*notify_block,
+                */
+               kill_pending_fw_fallback_reqs(true);
+               device_cache_fw_images();
+-              disable_firmware();
+               break;
+ 
+       case PM_POST_SUSPEND:
+@@ -1837,7 +1742,6 @@ static int fw_pm_notify(struct notifier_block 
*notify_block,
+               mutex_lock(&fw_lock);
+               fw_cache.state = FW_LOADER_NO_CACHE;
+               mutex_unlock(&fw_lock);
+-              enable_firmware();
+ 
+               device_uncache_fw_images_delay(10 * MSEC_PER_SEC);
+               break;
+@@ -1886,7 +1790,6 @@ static void __init fw_cache_init(void)
+ static int fw_shutdown_notify(struct notifier_block *unused1,
+                             unsigned long unused2, void *unused3)
+ {
+-      disable_firmware();
+       /*
+        * Kill all pending fallback requests to avoid both stalling shutdown,
+        * and avoid a deadlock with the usermode_lock.
+@@ -1902,7 +1805,6 @@ static struct notifier_block fw_shutdown_nb = {
+ 
+ static int __init firmware_class_init(void)
+ {
+-      enable_firmware();
+       fw_cache_init();
+       register_reboot_notifier(&fw_shutdown_nb);
+ #ifdef CONFIG_FW_LOADER_USER_HELPER
+@@ -1914,7 +1816,6 @@ static int __init firmware_class_init(void)
+ 
+ static void __exit firmware_class_exit(void)
+ {
+-      disable_firmware();
+ #ifdef CONFIG_PM_SLEEP
+       unregister_syscore_ops(&fw_syscore_ops);
+       unregister_pm_notifier(&fw_cache.pm_notify);
+diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
+index a764d5ca7536..5bedf7bc3d88 100644
+--- a/drivers/mtd/nand/mxc_nand.c
++++ b/drivers/mtd/nand/mxc_nand.c
+@@ -876,6 +876,8 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int 
column, int page_addr)
+       }
+ }
+ 
++#define MXC_V1_ECCBYTES               5
++
+ static int mxc_v1_ooblayout_ecc(struct mtd_info *mtd, int section,
+                               struct mtd_oob_region *oobregion)
+ {
+@@ -885,7 +887,7 @@ static int mxc_v1_ooblayout_ecc(struct mtd_info *mtd, int 
section,
+               return -ERANGE;
+ 
+       oobregion->offset = (section * 16) + 6;
+-      oobregion->length = nand_chip->ecc.bytes;
++      oobregion->length = MXC_V1_ECCBYTES;
+ 
+       return 0;
+ }
+@@ -907,8 +909,7 @@ static int mxc_v1_ooblayout_free(struct mtd_info *mtd, int 
section,
+                       oobregion->length = 4;
+               }
+       } else {
+-              oobregion->offset = ((section - 1) * 16) +
+-                                  nand_chip->ecc.bytes + 6;
++              oobregion->offset = ((section - 1) * 16) + MXC_V1_ECCBYTES + 6;
+               if (section < nand_chip->ecc.steps)
+                       oobregion->length = (section * 16) + 6 -
+                                           oobregion->offset;
+diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
+index c6c18b82f8f4..c05cf874cbb8 100644
+--- a/drivers/mtd/nand/nand_base.c
++++ b/drivers/mtd/nand/nand_base.c
+@@ -3993,10 +3993,13 @@ static void nand_manufacturer_detect(struct nand_chip 
*chip)
+        * nand_decode_ext_id() otherwise.
+        */
+       if (chip->manufacturer.desc && chip->manufacturer.desc->ops &&
+-          chip->manufacturer.desc->ops->detect)
++          chip->manufacturer.desc->ops->detect) {
++              /* The 3rd id byte holds MLC / multichip data */
++              chip->bits_per_cell = nand_get_bits_per_cell(chip->id.data[2]);
+               chip->manufacturer.desc->ops->detect(chip);
+-      else
++      } else {
+               nand_decode_ext_id(chip);
++      }
+ }
+ 
+ /*
+diff --git a/drivers/mtd/nand/nand_hynix.c b/drivers/mtd/nand/nand_hynix.c
+index b12dc7325378..bd9a6e343848 100644
+--- a/drivers/mtd/nand/nand_hynix.c
++++ b/drivers/mtd/nand/nand_hynix.c
+@@ -477,7 +477,7 @@ static void hynix_nand_extract_ecc_requirements(struct 
nand_chip *chip,
+                * The ECC requirements field meaning depends on the
+                * NAND technology.
+                */
+-              u8 nand_tech = chip->id.data[5] & 0x3;
++              u8 nand_tech = chip->id.data[5] & 0x7;
+ 
+               if (nand_tech < 3) {
+                       /* > 26nm, reference: H27UBG8T2A datasheet */
+@@ -533,7 +533,7 @@ static void 
hynix_nand_extract_scrambling_requirements(struct nand_chip *chip,
+               if (nand_tech > 0)
+                       chip->options |= NAND_NEED_SCRAMBLING;
+       } else {
+-              nand_tech = chip->id.data[5] & 0x3;
++              nand_tech = chip->id.data[5] & 0x7;
+ 
+               /* < 32nm */
+               if (nand_tech > 2)
+diff --git a/drivers/mtd/nand/qcom_nandc.c b/drivers/mtd/nand/qcom_nandc.c
+index 88af7145a51a..8928500b5bde 100644
+--- a/drivers/mtd/nand/qcom_nandc.c
++++ b/drivers/mtd/nand/qcom_nandc.c
+@@ -109,7 +109,11 @@
+ #define       READ_ADDR                       0
+ 
+ /* NAND_DEV_CMD_VLD bits */
+-#define       READ_START_VLD                  0
++#define       READ_START_VLD                  BIT(0)
++#define       READ_STOP_VLD                   BIT(1)
++#define       WRITE_START_VLD                 BIT(2)
++#define       ERASE_START_VLD                 BIT(3)
++#define       SEQ_READ_START_VLD              BIT(4)
+ 
+ /* NAND_EBI2_ECC_BUF_CFG bits */
+ #define       NUM_STEPS                       0
+@@ -148,6 +152,10 @@
+ #define       FETCH_ID                        0xb
+ #define       RESET_DEVICE                    0xd
+ 
++/* Default Value for NAND_DEV_CMD_VLD */
++#define NAND_DEV_CMD_VLD_VAL          (READ_START_VLD | WRITE_START_VLD | \
++                                       ERASE_START_VLD | SEQ_READ_START_VLD)
++
+ /*
+  * the NAND controller performs reads/writes with ECC in 516 byte chunks.
+  * the driver calls the chunks 'step' or 'codeword' interchangeably
+@@ -672,8 +680,7 @@ static int nandc_param(struct qcom_nand_host *host)
+ 
+       /* configure CMD1 and VLD for ONFI param probing */
+       nandc_set_reg(nandc, NAND_DEV_CMD_VLD,
+-                    (nandc->vld & ~(1 << READ_START_VLD))
+-                    | 0 << READ_START_VLD);
++                    (nandc->vld & ~READ_START_VLD));
+       nandc_set_reg(nandc, NAND_DEV_CMD1,
+                     (nandc->cmd1 & ~(0xFF << READ_ADDR))
+                     | NAND_CMD_PARAM << READ_ADDR);
+@@ -1893,7 +1900,7 @@ static int qcom_nand_host_setup(struct qcom_nand_host 
*host)
+                               | wide_bus << WIDE_FLASH
+                               | 1 << DEV0_CFG1_ECC_DISABLE;
+ 
+-      host->ecc_bch_cfg = host->bch_enabled << ECC_CFG_ECC_DISABLE
++      host->ecc_bch_cfg = !host->bch_enabled << ECC_CFG_ECC_DISABLE
+                               | 0 << ECC_SW_RESET
+                               | host->cw_data << ECC_NUM_DATA_BYTES
+                               | 1 << ECC_FORCE_CLK_OPEN
+@@ -1972,13 +1979,14 @@ static int qcom_nandc_setup(struct 
qcom_nand_controller *nandc)
+ {
+       /* kill onenand */
+       nandc_write(nandc, SFLASHC_BURST_CFG, 0);
++      nandc_write(nandc, NAND_DEV_CMD_VLD, NAND_DEV_CMD_VLD_VAL);
+ 
+       /* enable ADM DMA */
+       nandc_write(nandc, NAND_FLASH_CHIP_SELECT, DM_EN);
+ 
+       /* save the original values of these registers */
+       nandc->cmd1 = nandc_read(nandc, NAND_DEV_CMD1);
+-      nandc->vld = nandc_read(nandc, NAND_DEV_CMD_VLD);
++      nandc->vld = NAND_DEV_CMD_VLD_VAL;
+ 
+       return 0;
+ }
+diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c 
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+index f1b60740e020..53ae30259989 100644
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+@@ -159,7 +159,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
+ 
+       brcmf_feat_firmware_capabilities(ifp);
+       memset(&gscan_cfg, 0, sizeof(gscan_cfg));
+-      if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
++      if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID &&
++          drvr->bus_if->chip != BRCM_CC_4345_CHIP_ID)
+               brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
+                                         "pfn_gscan_cfg",
+                                         &gscan_cfg, sizeof(gscan_cfg));
+diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c 
b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+index 0b75def39c6c..d2c289446c00 100644
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -3702,7 +3702,10 @@ static void rt2800_config_channel(struct rt2x00_dev 
*rt2x00dev,
+       if (rt2x00_rt(rt2x00dev, RT3572))
+               rt2800_rfcsr_write(rt2x00dev, 8, 0);
+ 
+-      tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
++      if (rt2x00_rt(rt2x00dev, RT6352))
++              tx_pin = rt2800_register_read(rt2x00dev, TX_PIN_CFG);
++      else
++              tx_pin = 0;
+ 
+       switch (rt2x00dev->default_ant.tx_chain_num) {
+       case 3:
+diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c 
b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
+index 31965f0ef69d..e8f07573aed9 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c
+@@ -1183,7 +1183,10 @@ static void btc8723b2ant_set_ant_path(struct 
btc_coexist *btcoexist,
+               }
+ 
+               /* fixed internal switch S1->WiFi, S0->BT */
+-              btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0);
++              if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT)
++                      btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0);
++              else
++                      btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280);
+ 
+               switch (antpos_type) {
+               case BTC_ANT_WIFI_AT_MAIN:
+diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c 
b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+index e6024b013ca5..00eea3440290 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
++++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
+@@ -173,6 +173,16 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist 
*btcoexist)
+ 
+ u8 rtl_get_hwpg_single_ant_path(struct rtl_priv *rtlpriv)
+ {
++      struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
++
++      /* override ant_num / ant_path */
++      if (mod_params->ant_sel) {
++              rtlpriv->btcoexist.btc_info.ant_num =
++                      (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1);
++
++              rtlpriv->btcoexist.btc_info.single_ant_path =
++                      (mod_params->ant_sel == 1 ? 0 : 1);
++      }
+       return rtlpriv->btcoexist.btc_info.single_ant_path;
+ }
+ 
+@@ -183,6 +193,7 @@ u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv)
+ 
+ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
+ {
++      struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;
+       u8 num;
+ 
+       if (rtlpriv->btcoexist.btc_info.ant_num == ANT_X2)
+@@ -190,6 +201,10 @@ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)
+       else
+               num = 1;
+ 
++      /* override ant_num / ant_path */
++      if (mod_params->ant_sel)
++              num = (mod_params->ant_sel == 1 ? ANT_X2 : ANT_X1) + 1;
++
+       return num;
+ }
+ 
+@@ -861,7 +876,7 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
+ {
+       struct btc_coexist *btcoexist = &gl_bt_coexist;
+       struct rtl_priv *rtlpriv = adapter;
+-      u8 ant_num = 2, chip_type, single_ant_path = 0;
++      u8 ant_num = 2, chip_type;
+ 
+       if (btcoexist->binded)
+               return false;
+@@ -896,12 +911,6 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter)
+       ant_num = rtl_get_hwpg_ant_num(rtlpriv);
+       exhalbtc_set_ant_num(rtlpriv, BT_COEX_ANT_TYPE_PG, ant_num);
+ 
+-      /* set default antenna position to main  port */
+-      btcoexist->board_info.btdm_ant_pos = BTC_ANTENNA_AT_MAIN_PORT;
+-
+-      single_ant_path = rtl_get_hwpg_single_ant_path(rtlpriv);
+-      exhalbtc_set_single_ant_path(single_ant_path);
+-
+       if (rtl_get_hwpg_package_type(rtlpriv) == 0)
+               btcoexist->board_info.tfbga_package = false;
+       else if (rtl_get_hwpg_package_type(rtlpriv) == 1)
+diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
+index 5f5cd306f76d..ffa7191ddfa5 100644
+--- a/drivers/nvme/host/fabrics.c
++++ b/drivers/nvme/host/fabrics.c
+@@ -75,7 +75,7 @@ static struct nvmf_host *nvmf_host_default(void)
+ 
+       kref_init(&host->ref);
+       snprintf(host->nqn, NVMF_NQN_SIZE,
+-              "nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb", &host->id);
++              "nqn.2014-08.org.nvmexpress:uuid:%pUb", &host->id);
+ 
+       mutex_lock(&nvmf_hosts_mutex);
+       list_add_tail(&host->list, &nvmf_hosts);
+diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
+index 12540b6104b5..1618dac7bf74 100644
+--- a/fs/btrfs/super.c
++++ b/fs/btrfs/super.c
+@@ -1814,6 +1814,8 @@ static int btrfs_remount(struct super_block *sb, int 
*flags, char *data)
+                       goto restore;
+               }
+ 
++              btrfs_qgroup_rescan_resume(fs_info);
++
+               if (!fs_info->uuid_root) {
+                       btrfs_info(fs_info, "creating UUID tree");
+                       ret = btrfs_create_uuid_tree(fs_info);
+diff --git a/fs/nfs/file.c b/fs/nfs/file.c
+index af330c31f627..a85d1cf9b4a8 100644
+--- a/fs/nfs/file.c
++++ b/fs/nfs/file.c
+@@ -631,11 +631,11 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct 
iov_iter *from)
+       if (result <= 0)
+               goto out;
+ 
+-      result = generic_write_sync(iocb, result);
+-      if (result < 0)
+-              goto out;
+       written = result;
+       iocb->ki_pos += written;
++      result = generic_write_sync(iocb, written);
++      if (result < 0)
++              goto out;
+ 
+       /* Return error values */
+       if (nfs_need_check_write(file, inode)) {
+diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
+index dc456416d2be..68cc22083639 100644
+--- a/fs/nfs/internal.h
++++ b/fs/nfs/internal.h
+@@ -251,7 +251,6 @@ int nfs_iocounter_wait(struct nfs_lock_context *l_ctx);
+ extern const struct nfs_pageio_ops nfs_pgio_rw_ops;
+ struct nfs_pgio_header *nfs_pgio_header_alloc(const struct nfs_rw_ops *);
+ void nfs_pgio_header_free(struct nfs_pgio_header *);
+-void nfs_pgio_data_destroy(struct nfs_pgio_header *);
+ int nfs_generic_pgio(struct nfs_pageio_descriptor *, struct nfs_pgio_header 
*);
+ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
+                     struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops,
+diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
+index de9066a92c0d..d291e6e72573 100644
+--- a/fs/nfs/pagelist.c
++++ b/fs/nfs/pagelist.c
+@@ -530,16 +530,6 @@ struct nfs_pgio_header *nfs_pgio_header_alloc(const 
struct nfs_rw_ops *ops)
+ }
+ EXPORT_SYMBOL_GPL(nfs_pgio_header_alloc);
+ 
+-/*
+- * nfs_pgio_header_free - Free a read or write header
+- * @hdr: The header to free
+- */
+-void nfs_pgio_header_free(struct nfs_pgio_header *hdr)
+-{
+-      hdr->rw_ops->rw_free_header(hdr);
+-}
+-EXPORT_SYMBOL_GPL(nfs_pgio_header_free);
+-
+ /**
+  * nfs_pgio_data_destroy - make @hdr suitable for reuse
+  *
+@@ -548,14 +538,24 @@ EXPORT_SYMBOL_GPL(nfs_pgio_header_free);
+  *
+  * @hdr: A header that has had nfs_generic_pgio called
+  */
+-void nfs_pgio_data_destroy(struct nfs_pgio_header *hdr)
++static void nfs_pgio_data_destroy(struct nfs_pgio_header *hdr)
+ {
+       if (hdr->args.context)
+               put_nfs_open_context(hdr->args.context);
+       if (hdr->page_array.pagevec != hdr->page_array.page_array)
+               kfree(hdr->page_array.pagevec);
+ }
+-EXPORT_SYMBOL_GPL(nfs_pgio_data_destroy);
++
++/*
++ * nfs_pgio_header_free - Free a read or write header
++ * @hdr: The header to free
++ */
++void nfs_pgio_header_free(struct nfs_pgio_header *hdr)
++{
++      nfs_pgio_data_destroy(hdr);
++      hdr->rw_ops->rw_free_header(hdr);
++}
++EXPORT_SYMBOL_GPL(nfs_pgio_header_free);
+ 
+ /**
+  * nfs_pgio_rpcsetup - Set up arguments for a pageio call
+@@ -669,7 +669,6 @@ EXPORT_SYMBOL_GPL(nfs_initiate_pgio);
+ static void nfs_pgio_error(struct nfs_pgio_header *hdr)
+ {
+       set_bit(NFS_IOHDR_REDO, &hdr->flags);
+-      nfs_pgio_data_destroy(hdr);
+       hdr->completion_ops->completion(hdr);
+ }
+ 
+@@ -680,7 +679,6 @@ static void nfs_pgio_error(struct nfs_pgio_header *hdr)
+ static void nfs_pgio_release(void *calldata)
+ {
+       struct nfs_pgio_header *hdr = calldata;
+-      nfs_pgio_data_destroy(hdr);
+       hdr->completion_ops->completion(hdr);
+ }
+ 
+@@ -714,9 +712,6 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
+                    int io_flags,
+                    gfp_t gfp_flags)
+ {
+-      struct nfs_pgio_mirror *new;
+-      int i;
+-
+       desc->pg_moreio = 0;
+       desc->pg_inode = inode;
+       desc->pg_ops = pg_ops;
+@@ -732,21 +727,9 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
+       desc->pg_mirror_count = 1;
+       desc->pg_mirror_idx = 0;
+ 
+-      if (pg_ops->pg_get_mirror_count) {
+-              /* until we have a request, we don't have an lseg and no
+-               * idea how many mirrors there will be */
+-              new = kcalloc(NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX,
+-                            sizeof(struct nfs_pgio_mirror), gfp_flags);
+-              desc->pg_mirrors_dynamic = new;
+-              desc->pg_mirrors = new;
+-
+-              for (i = 0; i < NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX; i++)
+-                      nfs_pageio_mirror_init(&desc->pg_mirrors[i], bsize);
+-      } else {
+-              desc->pg_mirrors_dynamic = NULL;
+-              desc->pg_mirrors = desc->pg_mirrors_static;
+-              nfs_pageio_mirror_init(&desc->pg_mirrors[0], bsize);
+-      }
++      desc->pg_mirrors_dynamic = NULL;
++      desc->pg_mirrors = desc->pg_mirrors_static;
++      nfs_pageio_mirror_init(&desc->pg_mirrors[0], bsize);
+ }
+ EXPORT_SYMBOL_GPL(nfs_pageio_init);
+ 
+@@ -865,32 +848,52 @@ static int nfs_generic_pg_pgios(struct 
nfs_pageio_descriptor *desc)
+       return ret;
+ }
+ 
++static struct nfs_pgio_mirror *
++nfs_pageio_alloc_mirrors(struct nfs_pageio_descriptor *desc,
++              unsigned int mirror_count)
++{
++      struct nfs_pgio_mirror *ret;
++      unsigned int i;
++
++      kfree(desc->pg_mirrors_dynamic);
++      desc->pg_mirrors_dynamic = NULL;
++      if (mirror_count == 1)
++              return desc->pg_mirrors_static;
++      ret = kmalloc_array(mirror_count, sizeof(*ret), GFP_NOFS);
++      if (ret != NULL) {
++              for (i = 0; i < mirror_count; i++)
++                      nfs_pageio_mirror_init(&ret[i], desc->pg_bsize);
++              desc->pg_mirrors_dynamic = ret;
++      }
++      return ret;
++}
++
+ /*
+  * nfs_pageio_setup_mirroring - determine if mirroring is to be used
+  *                            by calling the pg_get_mirror_count op
+  */
+-static int nfs_pageio_setup_mirroring(struct nfs_pageio_descriptor *pgio,
++static void nfs_pageio_setup_mirroring(struct nfs_pageio_descriptor *pgio,
+                                      struct nfs_page *req)
+ {
+-      int mirror_count = 1;
++      unsigned int mirror_count = 1;
+ 
+-      if (!pgio->pg_ops->pg_get_mirror_count)
+-              return 0;
+-
+-      mirror_count = pgio->pg_ops->pg_get_mirror_count(pgio, req);
+-
+-      if (pgio->pg_error < 0)
+-              return pgio->pg_error;
+-
+-      if (!mirror_count || mirror_count > NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX)
+-              return -EINVAL;
++      if (pgio->pg_ops->pg_get_mirror_count)
++              mirror_count = pgio->pg_ops->pg_get_mirror_count(pgio, req);
++      if (mirror_count == pgio->pg_mirror_count || pgio->pg_error < 0)
++              return;
+ 
+-      if (WARN_ON_ONCE(!pgio->pg_mirrors_dynamic))
+-              return -EINVAL;
++      if (!mirror_count || mirror_count > NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX) {
++              pgio->pg_error = -EINVAL;
++              return;
++      }
+ 
++      pgio->pg_mirrors = nfs_pageio_alloc_mirrors(pgio, mirror_count);
++      if (pgio->pg_mirrors == NULL) {
++              pgio->pg_error = -ENOMEM;
++              pgio->pg_mirrors = pgio->pg_mirrors_static;
++              mirror_count = 1;
++      }
+       pgio->pg_mirror_count = mirror_count;
+-
+-      return 0;
+ }
+ 
+ /*
+diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
+index c383d0913b54..64bb20130edf 100644
+--- a/fs/nfs/pnfs.c
++++ b/fs/nfs/pnfs.c
+@@ -2274,7 +2274,6 @@ pnfs_write_through_mds(struct nfs_pageio_descriptor 
*desc,
+               nfs_pageio_reset_write_mds(desc);
+               mirror->pg_recoalesce = 1;
+       }
+-      nfs_pgio_data_destroy(hdr);
+       hdr->release(hdr);
+ }
+ 
+@@ -2398,7 +2397,6 @@ pnfs_read_through_mds(struct nfs_pageio_descriptor *desc,
+               nfs_pageio_reset_read_mds(desc);
+               mirror->pg_recoalesce = 1;
+       }
+-      nfs_pgio_data_destroy(hdr);
+       hdr->release(hdr);
+ }
+ 
+diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
+index 9301c5a6060b..dcd1292664b3 100644
+--- a/fs/xfs/xfs_linux.h
++++ b/fs/xfs/xfs_linux.h
+@@ -270,7 +270,14 @@ static inline uint64_t howmany_64(uint64_t x, uint32_t y)
+ #endif /* DEBUG */
+ 
+ #ifdef CONFIG_XFS_RT
+-#define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME)
++
++/*
++ * make sure we ignore the inode flag if the filesystem doesn't have a
++ * configured realtime device.
++ */
++#define XFS_IS_REALTIME_INODE(ip)                     \
++      (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) &&  \
++       (ip)->i_mount->m_rtdev_targp)
+ #else
+ #define XFS_IS_REALTIME_INODE(ip) (0)
+ #endif
+diff --git a/lib/radix-tree.c b/lib/radix-tree.c
+index 898e87998417..79a804f1aab9 100644
+--- a/lib/radix-tree.c
++++ b/lib/radix-tree.c
+@@ -463,7 +463,7 @@ radix_tree_node_free(struct radix_tree_node *node)
+  * To make use of this facility, the radix tree must be initialised without
+  * __GFP_DIRECT_RECLAIM being passed to INIT_RADIX_TREE().
+  */
+-static int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)
++static __must_check int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)
+ {
+       struct radix_tree_preload *rtp;
+       struct radix_tree_node *node;
+@@ -2103,7 +2103,8 @@ EXPORT_SYMBOL(radix_tree_tagged);
+  */
+ void idr_preload(gfp_t gfp_mask)
+ {
+-      __radix_tree_preload(gfp_mask, IDR_PRELOAD_SIZE);
++      if (__radix_tree_preload(gfp_mask, IDR_PRELOAD_SIZE))
++              preempt_disable();
+ }
+ EXPORT_SYMBOL(idr_preload);
+ 
+@@ -2117,13 +2118,13 @@ EXPORT_SYMBOL(idr_preload);
+  */
+ int ida_pre_get(struct ida *ida, gfp_t gfp)
+ {
+-      __radix_tree_preload(gfp, IDA_PRELOAD_SIZE);
+       /*
+        * The IDA API has no preload_end() equivalent.  Instead,
+        * ida_get_new() can return -EAGAIN, prompting the caller
+        * to return to the ida_pre_get() step.
+        */
+-      preempt_enable();
++      if (!__radix_tree_preload(gfp, IDA_PRELOAD_SIZE))
++              preempt_enable();
+ 
+       if (!this_cpu_read(ida_bitmap)) {
+               struct ida_bitmap *bitmap = kmalloc(sizeof(*bitmap), gfp);
+diff --git a/mm/memory.c b/mm/memory.c
+index 56e48e4593cb..274547075486 100644
+--- a/mm/memory.c
++++ b/mm/memory.c
+@@ -3888,6 +3888,11 @@ int handle_mm_fault(struct vm_area_struct *vma, 
unsigned long address,
+       /* do counter updates before entering really critical section. */
+       check_sync_rss_stat(current);
+ 
++      if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
++                                          flags & FAULT_FLAG_INSTRUCTION,
++                                          flags & FAULT_FLAG_REMOTE))
++              return VM_FAULT_SIGSEGV;
++
+       /*
+        * Enable the memcg OOM handling for faults triggered in user
+        * space.  Kernel faults are handled more gracefully.
+@@ -3895,11 +3900,6 @@ int handle_mm_fault(struct vm_area_struct *vma, 
unsigned long address,
+       if (flags & FAULT_FLAG_USER)
+               mem_cgroup_oom_enable();
+ 
+-      if (!arch_vma_access_permitted(vma, flags & FAULT_FLAG_WRITE,
+-                                          flags & FAULT_FLAG_INSTRUCTION,
+-                                          flags & FAULT_FLAG_REMOTE))
+-              return VM_FAULT_SIGSEGV;
+-
+       if (unlikely(is_vm_hugetlb_page(vma)))
+               ret = hugetlb_fault(vma->vm_mm, vma, address, flags);
+       else
+diff --git a/mm/sparse.c b/mm/sparse.c
+index 7b4be3fd5cac..cdce7a7bb3f3 100644
+--- a/mm/sparse.c
++++ b/mm/sparse.c
+@@ -630,7 +630,7 @@ void online_mem_sections(unsigned long start_pfn, unsigned 
long end_pfn)
+       unsigned long pfn;
+ 
+       for (pfn = start_pfn; pfn < end_pfn; pfn += PAGES_PER_SECTION) {
+-              unsigned long section_nr = pfn_to_section_nr(start_pfn);
++              unsigned long section_nr = pfn_to_section_nr(pfn);
+               struct mem_section *ms;
+ 
+               /* onlining code should never touch invalid ranges */
+diff --git a/mm/swapfile.c b/mm/swapfile.c
+index 6ba4aab2db0b..a8952b6563c6 100644
+--- a/mm/swapfile.c
++++ b/mm/swapfile.c
+@@ -3052,7 +3052,8 @@ SYSCALL_DEFINE2(swapon, const char __user *, 
specialfile, int, swap_flags)
+       p->flags = 0;
+       spin_unlock(&swap_lock);
+       vfree(swap_map);
+-      vfree(cluster_info);
++      kvfree(cluster_info);
++      kvfree(frontswap_map);
+       if (swap_file) {
+               if (inode && S_ISREG(inode->i_mode)) {
+                       inode_unlock(inode);
+diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
+index 303c779bfe38..43ba91c440bc 100644
+--- a/net/bluetooth/l2cap_core.c
++++ b/net/bluetooth/l2cap_core.c
+@@ -58,7 +58,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn 
*conn,
+                                      u8 code, u8 ident, u16 dlen, void *data);
+ static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 
len,
+                          void *data);
+-static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
++static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t 
data_size);
+ static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err);
+ 
+ static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
+@@ -1473,7 +1473,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
+ 
+                       set_bit(CONF_REQ_SENT, &chan->conf_state);
+                       l2cap_send_cmd(conn, l2cap_get_ident(conn), 
L2CAP_CONF_REQ,
+-                                     l2cap_build_conf_req(chan, buf), buf);
++                                     l2cap_build_conf_req(chan, buf, 
sizeof(buf)), buf);
+                       chan->num_conf_req++;
+               }
+ 
+@@ -2987,12 +2987,15 @@ static inline int l2cap_get_conf_opt(void **ptr, int 
*type, int *olen,
+       return len;
+ }
+ 
+-static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
++static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long 
val, size_t size)
+ {
+       struct l2cap_conf_opt *opt = *ptr;
+ 
+       BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
+ 
++      if (size < L2CAP_CONF_OPT_SIZE + len)
++              return;
++
+       opt->type = type;
+       opt->len  = len;
+ 
+@@ -3017,7 +3020,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 
len, unsigned long val)
+       *ptr += L2CAP_CONF_OPT_SIZE + len;
+ }
+ 
+-static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan)
++static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t 
size)
+ {
+       struct l2cap_conf_efs efs;
+ 
+@@ -3045,7 +3048,7 @@ static void l2cap_add_opt_efs(void **ptr, struct 
l2cap_chan *chan)
+       }
+ 
+       l2cap_add_conf_opt(ptr, L2CAP_CONF_EFS, sizeof(efs),
+-                         (unsigned long) &efs);
++                         (unsigned long) &efs, size);
+ }
+ 
+ static void l2cap_ack_timeout(struct work_struct *work)
+@@ -3191,11 +3194,12 @@ static inline void l2cap_txwin_setup(struct l2cap_chan 
*chan)
+       chan->ack_win = chan->tx_win;
+ }
+ 
+-static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
++static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t 
data_size)
+ {
+       struct l2cap_conf_req *req = data;
+       struct l2cap_conf_rfc rfc = { .mode = chan->mode };
+       void *ptr = req->data;
++      void *endptr = data + data_size;
+       u16 size;
+ 
+       BT_DBG("chan %p", chan);
+@@ -3220,7 +3224,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, 
void *data)
+ 
+ done:
+       if (chan->imtu != L2CAP_DEFAULT_MTU)
+-              l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu);
++              l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu, endptr 
- ptr);
+ 
+       switch (chan->mode) {
+       case L2CAP_MODE_BASIC:
+@@ -3239,7 +3243,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, 
void *data)
+               rfc.max_pdu_size    = 0;
+ 
+               l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
+-                                 (unsigned long) &rfc);
++                                 (unsigned long) &rfc, endptr - ptr);
+               break;
+ 
+       case L2CAP_MODE_ERTM:
+@@ -3259,21 +3263,21 @@ static int l2cap_build_conf_req(struct l2cap_chan 
*chan, void *data)
+                                      L2CAP_DEFAULT_TX_WINDOW);
+ 
+               l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
+-                                 (unsigned long) &rfc);
++                                 (unsigned long) &rfc, endptr - ptr);
+ 
+               if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
+-                      l2cap_add_opt_efs(&ptr, chan);
++                      l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
+ 
+               if (test_bit(FLAG_EXT_CTRL, &chan->flags))
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 2,
+-                                         chan->tx_win);
++                                         chan->tx_win, endptr - ptr);
+ 
+               if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
+                       if (chan->fcs == L2CAP_FCS_NONE ||
+                           test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
+                               chan->fcs = L2CAP_FCS_NONE;
+                               l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
+-                                                 chan->fcs);
++                                                 chan->fcs, endptr - ptr);
+                       }
+               break;
+ 
+@@ -3291,17 +3295,17 @@ static int l2cap_build_conf_req(struct l2cap_chan 
*chan, void *data)
+               rfc.max_pdu_size = cpu_to_le16(size);
+ 
+               l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
+-                                 (unsigned long) &rfc);
++                                 (unsigned long) &rfc, endptr - ptr);
+ 
+               if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
+-                      l2cap_add_opt_efs(&ptr, chan);
++                      l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
+ 
+               if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
+                       if (chan->fcs == L2CAP_FCS_NONE ||
+                           test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
+                               chan->fcs = L2CAP_FCS_NONE;
+                               l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
+-                                                 chan->fcs);
++                                                 chan->fcs, endptr - ptr);
+                       }
+               break;
+       }
+@@ -3312,10 +3316,11 @@ static int l2cap_build_conf_req(struct l2cap_chan 
*chan, void *data)
+       return ptr - data;
+ }
+ 
+-static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data)
++static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t 
data_size)
+ {
+       struct l2cap_conf_rsp *rsp = data;
+       void *ptr = rsp->data;
++      void *endptr = data + data_size;
+       void *req = chan->conf_req;
+       int len = chan->conf_len;
+       int type, hint, olen;
+@@ -3417,7 +3422,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+                       return -ECONNREFUSED;
+ 
+               l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
+-                                 (unsigned long) &rfc);
++                                 (unsigned long) &rfc, endptr - ptr);
+       }
+ 
+       if (result == L2CAP_CONF_SUCCESS) {
+@@ -3430,7 +3435,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+                       chan->omtu = mtu;
+                       set_bit(CONF_MTU_DONE, &chan->conf_state);
+               }
+-              l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->omtu);
++              l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->omtu, endptr 
- ptr);
+ 
+               if (remote_efs) {
+                       if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
+@@ -3444,7 +3449,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+ 
+                               l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+                                                  sizeof(efs),
+-                                                 (unsigned long) &efs);
++                                                 (unsigned long) &efs, endptr 
- ptr);
+                       } else {
+                               /* Send PENDING Conf Rsp */
+                               result = L2CAP_CONF_PENDING;
+@@ -3477,7 +3482,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+                       set_bit(CONF_MODE_DONE, &chan->conf_state);
+ 
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+-                                         sizeof(rfc), (unsigned long) &rfc);
++                                         sizeof(rfc), (unsigned long) &rfc, 
endptr - ptr);
+ 
+                       if (test_bit(FLAG_EFS_ENABLE, &chan->flags)) {
+                               chan->remote_id = efs.id;
+@@ -3491,7 +3496,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+                                       le32_to_cpu(efs.sdu_itime);
+                               l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
+                                                  sizeof(efs),
+-                                                 (unsigned long) &efs);
++                                                 (unsigned long) &efs, endptr 
- ptr);
+                       }
+                       break;
+ 
+@@ -3505,7 +3510,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, 
void *data)
+                       set_bit(CONF_MODE_DONE, &chan->conf_state);
+ 
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
+-                                         (unsigned long) &rfc);
++                                         (unsigned long) &rfc, endptr - ptr);
+ 
+                       break;
+ 
+@@ -3527,10 +3532,11 @@ static int l2cap_parse_conf_req(struct l2cap_chan 
*chan, void *data)
+ }
+ 
+ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
+-                              void *data, u16 *result)
++                              void *data, size_t size, u16 *result)
+ {
+       struct l2cap_conf_req *req = data;
+       void *ptr = req->data;
++      void *endptr = data + size;
+       int type, olen;
+       unsigned long val;
+       struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
+@@ -3548,13 +3554,13 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan 
*chan, void *rsp, int len,
+                               chan->imtu = L2CAP_DEFAULT_MIN_MTU;
+                       } else
+                               chan->imtu = val;
+-                      l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu);
++                      l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu, 
endptr - ptr);
+                       break;
+ 
+               case L2CAP_CONF_FLUSH_TO:
+                       chan->flush_to = val;
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO,
+-                                         2, chan->flush_to);
++                                         2, chan->flush_to, endptr - ptr);
+                       break;
+ 
+               case L2CAP_CONF_RFC:
+@@ -3568,13 +3574,13 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan 
*chan, void *rsp, int len,
+                       chan->fcs = 0;
+ 
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
+-                                         sizeof(rfc), (unsigned long) &rfc);
++                                         sizeof(rfc), (unsigned long) &rfc, 
endptr - ptr);
+                       break;
+ 
+               case L2CAP_CONF_EWS:
+                       chan->ack_win = min_t(u16, val, chan->ack_win);
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 2,
+-                                         chan->tx_win);
++                                         chan->tx_win, endptr - ptr);
+                       break;
+ 
+               case L2CAP_CONF_EFS:
+@@ -3587,7 +3593,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, 
void *rsp, int len,
+                               return -ECONNREFUSED;
+ 
+                       l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS, sizeof(efs),
+-                                         (unsigned long) &efs);
++                                         (unsigned long) &efs, endptr - ptr);
+                       break;
+ 
+               case L2CAP_CONF_FCS:
+@@ -3692,7 +3698,7 @@ void __l2cap_connect_rsp_defer(struct l2cap_chan *chan)
+               return;
+ 
+       l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
+-                     l2cap_build_conf_req(chan, buf), buf);
++                     l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
+       chan->num_conf_req++;
+ }
+ 
+@@ -3900,7 +3906,7 @@ static struct l2cap_chan *l2cap_connect(struct 
l2cap_conn *conn,
+               u8 buf[128];
+               set_bit(CONF_REQ_SENT, &chan->conf_state);
+               l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
+-                             l2cap_build_conf_req(chan, buf), buf);
++                             l2cap_build_conf_req(chan, buf, sizeof(buf)), 
buf);
+               chan->num_conf_req++;
+       }
+ 
+@@ -3978,7 +3984,7 @@ static int l2cap_connect_create_rsp(struct l2cap_conn 
*conn,
+                       break;
+ 
+               l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
+-                             l2cap_build_conf_req(chan, req), req);
++                             l2cap_build_conf_req(chan, req, sizeof(req)), 
req);
+               chan->num_conf_req++;
+               break;
+ 
+@@ -4090,7 +4096,7 @@ static inline int l2cap_config_req(struct l2cap_conn 
*conn,
+       }
+ 
+       /* Complete config. */
+-      len = l2cap_parse_conf_req(chan, rsp);
++      len = l2cap_parse_conf_req(chan, rsp, sizeof(rsp));
+       if (len < 0) {
+               l2cap_send_disconn_req(chan, ECONNRESET);
+               goto unlock;
+@@ -4124,7 +4130,7 @@ static inline int l2cap_config_req(struct l2cap_conn 
*conn,
+       if (!test_and_set_bit(CONF_REQ_SENT, &chan->conf_state)) {
+               u8 buf[64];
+               l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
+-                             l2cap_build_conf_req(chan, buf), buf);
++                             l2cap_build_conf_req(chan, buf, sizeof(buf)), 
buf);
+               chan->num_conf_req++;
+       }
+ 
+@@ -4184,7 +4190,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn 
*conn,
+                       char buf[64];
+ 
+                       len = l2cap_parse_conf_rsp(chan, rsp->data, len,
+-                                                 buf, &result);
++                                                 buf, sizeof(buf), &result);
+                       if (len < 0) {
+                               l2cap_send_disconn_req(chan, ECONNRESET);
+                               goto done;
+@@ -4214,7 +4220,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn 
*conn,
+                       /* throw out any old stored conf requests */
+                       result = L2CAP_CONF_SUCCESS;
+                       len = l2cap_parse_conf_rsp(chan, rsp->data, len,
+-                                                 req, &result);
++                                                 req, sizeof(req), &result);
+                       if (len < 0) {
+                               l2cap_send_disconn_req(chan, ECONNRESET);
+                               goto done;
+@@ -4791,7 +4797,7 @@ static void l2cap_do_create(struct l2cap_chan *chan, int 
result,
+                       set_bit(CONF_REQ_SENT, &chan->conf_state);
+                       l2cap_send_cmd(chan->conn, l2cap_get_ident(chan->conn),
+                                      L2CAP_CONF_REQ,
+-                                     l2cap_build_conf_req(chan, buf), buf);
++                                     l2cap_build_conf_req(chan, buf, 
sizeof(buf)), buf);
+                       chan->num_conf_req++;
+               }
+       }
+@@ -7465,7 +7471,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 
status, u8 encrypt)
+                               set_bit(CONF_REQ_SENT, &chan->conf_state);
+                               l2cap_send_cmd(conn, l2cap_get_ident(conn),
+                                              L2CAP_CONF_REQ,
+-                                             l2cap_build_conf_req(chan, buf),
++                                             l2cap_build_conf_req(chan, buf, 
sizeof(buf)),
+                                              buf);
+                               chan->num_conf_req++;
+                       }
+diff --git a/tools/testing/selftests/timers/Makefile 
b/tools/testing/selftests/timers/Makefile
+index a9b86133b9b3..dfa916e651fb 100644
+--- a/tools/testing/selftests/timers/Makefile
++++ b/tools/testing/selftests/timers/Makefile
+@@ -14,20 +14,20 @@ TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend 
valid-adjtimex adjtick change_skew
+ 
+ include ../lib.mk
+ 
++define RUN_DESTRUCTIVE_TESTS
++      @for TEST in $(TEST_GEN_PROGS_EXTENDED); do \
++              BASENAME_TEST=`basename $$TEST`;        \
++              if [ ! -x $$BASENAME_TEST ]; then       \
++                      echo "selftests: Warning: file $$BASENAME_TEST is not 
executable, correct this.";\
++                      echo "selftests: $$BASENAME_TEST [FAIL]"; \
++              else                                    \
++                      cd `dirname $$TEST`; (./$$BASENAME_TEST && echo 
"selftests: $$BASENAME_TEST [PASS]") || echo "selftests:  $$BASENAME_TEST 
[FAIL]"; cd -;\
++              fi;                                     \
++      done;
++endef
++
+ # these tests require escalated privileges
+ # and may modify the system time or trigger
+ # other behavior like suspend
+ run_destructive_tests: run_tests
+-      ./alarmtimer-suspend
+-      ./valid-adjtimex
+-      ./adjtick
+-      ./change_skew
+-      ./skew_consistency
+-      ./clocksource-switch
+-      ./freq-step
+-      ./leap-a-day -s -i 10
+-      ./leapcrash
+-      ./set-tz
+-      ./set-tai
+-      ./set-2038
+-
++      $(RUN_DESTRUCTIVE_TESTS)
+diff --git a/tools/testing/selftests/timers/leap-a-day.c 
b/tools/testing/selftests/timers/leap-a-day.c
+index fb46ad6ac92c..067017634057 100644
+--- a/tools/testing/selftests/timers/leap-a-day.c
++++ b/tools/testing/selftests/timers/leap-a-day.c
+@@ -190,18 +190,18 @@ int main(int argc, char **argv)
+       struct sigevent se;
+       struct sigaction act;
+       int signum = SIGRTMAX;
+-      int settime = 0;
++      int settime = 1;
+       int tai_time = 0;
+       int insert = 1;
+-      int iterations = -1;
++      int iterations = 10;
+       int opt;
+ 
+       /* Process arguments */
+       while ((opt = getopt(argc, argv, "sti:")) != -1) {
+               switch (opt) {
+-              case 's':
+-                      printf("Setting time to speed up testing\n");
+-                      settime = 1;
++              case 'w':
++                      printf("Only setting leap-flag, not changing time. It 
could take up to a day for leap to trigger.\n");
++                      settime = 0;
+                       break;
+               case 'i':
+                       iterations = atoi(optarg);
+@@ -210,9 +210,10 @@ int main(int argc, char **argv)
+                       tai_time = 1;
+                       break;
+               default:
+-                      printf("Usage: %s [-s] [-i <iterations>]\n", argv[0]);
+-                      printf("        -s: Set time to right before leap 
second each iteration\n");
+-                      printf("        -i: Number of iterations\n");
++                      printf("Usage: %s [-w] [-i <iterations>]\n", argv[0]);
++                      printf("        -w: Set flag and wait for leap second 
each iteration");
++                      printf("            (default sets time to right before 
leapsecond)\n");
++                      printf("        -i: Number of iterations (-1 = 
infinite, default is 10)\n");
+                       printf("        -t: Print TAI time\n");
+                       exit(-1);
+               }
+diff --git a/tools/testing/selftests/x86/fsgsbase.c 
b/tools/testing/selftests/x86/fsgsbase.c
+index b4967d875236..f249e042b3b5 100644
+--- a/tools/testing/selftests/x86/fsgsbase.c
++++ b/tools/testing/selftests/x86/fsgsbase.c
+@@ -285,9 +285,12 @@ static void *threadproc(void *ctx)
+       }
+ }
+ 
+-static void set_gs_and_switch_to(unsigned long local, unsigned long remote)
++static void set_gs_and_switch_to(unsigned long local,
++                               unsigned short force_sel,
++                               unsigned long remote)
+ {
+       unsigned long base;
++      unsigned short sel_pre_sched, sel_post_sched;
+ 
+       bool hard_zero = false;
+       if (local == HARD_ZERO) {
+@@ -297,6 +300,8 @@ static void set_gs_and_switch_to(unsigned long local, 
unsigned long remote)
+ 
+       printf("[RUN]\tARCH_SET_GS(0x%lx)%s, then schedule to 0x%lx\n",
+              local, hard_zero ? " and clear gs" : "", remote);
++      if (force_sel)
++              printf("\tBefore schedule, set selector to 0x%hx\n", force_sel);
+       if (syscall(SYS_arch_prctl, ARCH_SET_GS, local) != 0)
+               err(1, "ARCH_SET_GS");
+       if (hard_zero)
+@@ -307,18 +312,35 @@ static void set_gs_and_switch_to(unsigned long local, 
unsigned long remote)
+               printf("[FAIL]\tGSBASE wasn't set as expected\n");
+       }
+ 
++      if (force_sel) {
++              asm volatile ("mov %0, %%gs" : : "rm" (force_sel));
++              sel_pre_sched = force_sel;
++              local = read_base(GS);
++
++              /*
++               * Signal delivery seems to mess up weird selectors.  Put it
++               * back.
++               */
++              asm volatile ("mov %0, %%gs" : : "rm" (force_sel));
++      } else {
++              asm volatile ("mov %%gs, %0" : "=rm" (sel_pre_sched));
++      }
++
+       remote_base = remote;
+       ftx = 1;
+       syscall(SYS_futex, &ftx, FUTEX_WAKE, 0, NULL, NULL, 0);
+       while (ftx != 0)
+               syscall(SYS_futex, &ftx, FUTEX_WAIT, 1, NULL, NULL, 0);
+ 
++      asm volatile ("mov %%gs, %0" : "=rm" (sel_post_sched));
+       base = read_base(GS);
+-      if (base == local) {
+-              printf("[OK]\tGSBASE remained 0x%lx\n", local);
++      if (base == local && sel_pre_sched == sel_post_sched) {
++              printf("[OK]\tGS/BASE remained 0x%hx/0x%lx\n",
++                     sel_pre_sched, local);
+       } else {
+               nerrs++;
+-              printf("[FAIL]\tGSBASE changed to 0x%lx\n", base);
++              printf("[FAIL]\tGS/BASE changed from 0x%hx/0x%lx to 
0x%hx/0x%lx\n",
++                     sel_pre_sched, local, sel_post_sched, base);
+       }
+ }
+ 
+@@ -381,8 +403,15 @@ int main()
+ 
+       for (int local = 0; local < 4; local++) {
+               for (int remote = 0; remote < 4; remote++) {
+-                      set_gs_and_switch_to(bases_with_hard_zero[local],
+-                                           bases_with_hard_zero[remote]);
++                      for (unsigned short s = 0; s < 5; s++) {
++                              unsigned short sel = s;
++                              if (s == 4)
++                                      asm ("mov %%ss, %0" : "=rm" (sel));
++                              set_gs_and_switch_to(
++                                      bases_with_hard_zero[local],
++                                      sel,
++                                      bases_with_hard_zero[remote]);
++                      }
+               }
+       }
+ 

++++++ patches.suse.tar.bz2 ++++++
++++ 5238 lines of diff (skipped)

++++++ series.conf ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:16.777862794 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:16.777862794 +0200
@@ -28,6 +28,7 @@
        # Send separate patches upstream if you find a problem...
        ########################################################
        patches.kernel.org/patch-4.13.1
+       patches.kernel.org/patch-4.13.1-2
 
        ########################################################
        # Build fixes that apply to the vanilla kernel too.
@@ -326,7 +327,6 @@
        ########################################################
        # Wireless Networking
        ########################################################
-       patches.drivers/rt2800-fix-TX_PIN_CFG-setting-for-non-MT7620-chips
        patches.suse/b43-missing-firmware-info.patch
        patches.suse/iwlwifi-expose-default-fallback-ucode-api
 
@@ -430,10 +430,9 @@
        ########################################################
        patches.suse/crasher.patch
 
-       # pending
+       # upstream
        
patches.suse/0001-x86-entry-64-Refactor-IRQ-stacks-and-make-them-NMI-s.patch
        
patches.suse/0002-x86-entry-64-Initialize-the-top-of-the-IRQ-stack-bef.patch
-
        patches.suse/0003-x86-dumpstack-Fix-occasionally-missing-registers.patch
        
patches.suse/0004-x86-dumpstack-Fix-interrupt-and-exception-stack-boun.patch
        patches.suse/0005-objtool-Add-ORC-unwind-table-generation.patch
@@ -441,15 +440,38 @@
        patches.suse/0007-x86-entry-64-Add-unwind-hint-annotations.patch
        patches.suse/0008-x86-asm-Add-unwind-hint-annotations-to-sync_core.patch
 
+       patches.suse/0001-objtool-Fix-gcov-check-for-older-versions-of-GCC.patch
 
        patches.suse/0001-x86-unwind-Add-the-ORC-unwinder.patch
        
patches.suse/0002-x86-kconfig-Make-it-easier-to-switch-to-the-new-ORC-.patch
        
patches.suse/0003-x86-kconfig-Consolidate-unwinders-into-multiple-choi.patch
 
-+dwarf patches.suse/0001-linkage-new-macros-for-assembler-symbols.patch
+       patches.suse/0001-x86-asm-Add-ASM_UNREACHABLE.patch
+       
patches.suse/0001-x86-asm-Make-objtool-unreachable-macros-independent-.patch
+       
patches.suse/0001-objtool-Assume-unannotated-UD2-instructions-are-dead.patch
+       
patches.suse/0002-objtool-Skip-unreachable-warnings-for-alt-instructio.patch
+
+       
patches.suse/0001-x86-asm-Fix-UNWIND_HINT_REGS-macro-for-older-binutil.patch
+
+       patches.suse/0001-objtool-Fix-validate_branch-return-codes.patch
+       
patches.suse/0002-objtool-Track-DRAP-separately-from-callee-saved-regi.patch
+
+       
patches.suse/0001-objtool-Fix-objtool-fallthrough-detection-with-funct.patch
+       patches.suse/0001-objtool-Handle-GCC-stack-pointer-adjustment-bug.patch
+
+       # pending
+       
patches.suse/0001-objtool-Don-t-report-end-of-section-error-after-an-e.patch
+       patches.suse/0002-x86-head-Remove-confusing-comment.patch
+       patches.suse/0003-x86-head-Remove-unused-bad_address-code.patch
+       patches.suse/0004-x86-head-Fix-head-ELF-function-annotations.patch
+       
patches.suse/0005-x86-boot-Annotate-verify_cpu-as-a-callable-function.patch
+       patches.suse/0006-x86-xen-Fix-xen-head-ELF-annotations.patch
+       patches.suse/0007-x86-xen-Add-unwind-hint-annotations.patch
+       patches.suse/0007-x86-xen-Add-unwind-hint-annotations-fix.patch
+       patches.suse/0008-x86-head-Add-unwind-hint-annotations.patch
+
+       # to be thrown away, I suppose
        patches.suse/0002-dwarf-do-not-throw-away-unwind-info.patch
-+dwarf patches.suse/0003-DWARF-EH-frame-based-stack-unwinding.patch
-+dwarf patches.suse/stack-unwind-disable-kasan.patch
 
        ########################################################
        # Kdump

++++++ source-timestamp ++++++
--- /var/tmp/diff_new_pack.XO6wrF/_old  2017-09-17 22:27:16.809858292 +0200
+++ /var/tmp/diff_new_pack.XO6wrF/_new  2017-09-17 22:27:16.809858292 +0200
@@ -1,3 +1,3 @@
-2017-09-10 14:02:44 +0200
-GIT Revision: 0d725b56e7e719a5cff950788a43e664bef53cbb
+2017-09-14 20:42:01 +0200
+GIT Revision: 68f4aeee6ce13c7bad6891759df622444734a9f1
 GIT Branch: stable


Reply via email to