Update to 4.9.2

This commit is contained in:
Ben Hutchings 2017-01-09 21:06:30 +00:00
parent 1eea5583cd
commit 13c410d6c1
9 changed files with 17 additions and 296 deletions

5
debian/changelog vendored
View File

@ -1,4 +1,7 @@
linux (4.9.1-1~exp2) UNRELEASED; urgency=medium
linux (4.9.2-1~exp1) UNRELEASED; urgency=medium
* New upstream stable update:
https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.2
[ Ben Hutchings ]
* abiupdate.py: Use current config instead of downloading previous config

View File

@ -1,40 +0,0 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Sun, 18 Dec 2016 13:11:46 +0300
Subject: docs: sphinx-extensions: make rstFlatTable work with docutils 0.13
Origin: https://www.spinics.net/lists/linux-doc/msg42218.html
Bug-Debian: https://bugs.debian.org/848349
In docutils 0.13, the return type of get_column_widths method of the
Table directive has changed [1], which breaks our flat-table directive
and leads to a TypeError when trying to build the docs [2].
This patch adds support for the new return type, while keeping support
for older docutils versions too.
[1] https://sourceforge.net/p/docutils/patches/120/
[2] https://sourceforge.net/p/docutils/bugs/303/
Signed-off-by: Dmitry Shachnev <mitya57@debian.org>
---
Documentation/sphinx/rstFlatTable.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/sphinx/rstFlatTable.py b/Documentation/sphinx/rstFlatTable.py
index 55f2757..25feb0d 100755
--- a/Documentation/sphinx/rstFlatTable.py
+++ b/Documentation/sphinx/rstFlatTable.py
@@ -157,6 +157,11 @@ class ListTableBuilder(object):
def buildTableNode(self):
colwidths = self.directive.get_column_widths(self.max_cols)
+ if isinstance(colwidths, tuple):
+ # Since docutils 0.13, get_column_widths returns a (widths,
+ # colwidths) tuple, where widths is a string (i.e. 'auto').
+ # See https://sourceforge.net/p/docutils/patches/120/.
+ colwidths = colwidths[1]
stub_columns = self.directive.options.get('stub-columns', 0)
header_rows = self.directive.options.get('header-rows', 0)
--
2.1.4

View File

@ -233,18 +233,18 @@ upstream submission.
where = 0;
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -1765,10 +1765,8 @@ gf100_gr_ctor_fw(struct gf100_gr *gr, co
int ret;
ret = nvkm_firmware_get(device, fwname, &fw);
- if (ret) {
- nvkm_error(subdev, "failed to load %s\n", fwname);
+ if (ret)
return ret;
- }
@@ -1787,10 +1787,8 @@ gf100_gr_ctor_fw_legacy(struct gf100_gr
if (ret) {
snprintf(f, sizeof(f), "nouveau/%s", fwname);
ret = request_firmware(&fw, f, device->dev);
- if (ret) {
- nvkm_error(subdev, "failed to load %s\n", fwname);
+ if (ret)
return ret;
- }
}
fuc->size = fw->size;
fuc->data = kmemdup(fw->data, fuc->size, GFP_KERNEL);
--- a/drivers/gpu/drm/r128/r128_cce.c
+++ b/drivers/gpu/drm/r128/r128_cce.c
@@ -154,11 +154,8 @@ static int r128_cce_load_microcode(drm_r
@ -345,7 +345,7 @@ upstream submission.
card->name, firmware->size);
--- a/drivers/media/tuners/tuner-xc2028.c
+++ b/drivers/media/tuners/tuner-xc2028.c
@@ -1373,7 +1373,6 @@ static void load_firmware_cb(const struc
@@ -1374,7 +1374,6 @@ static void load_firmware_cb(const struc
tuner_dbg("request_firmware_nowait(): %s\n", fw ? "OK" : "error");
if (!fw) {
@ -1163,7 +1163,7 @@ upstream submission.
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3725,16 +3725,13 @@ static int bnx2_request_uncached_firmwar
@@ -3726,16 +3726,13 @@ static int bnx2_request_uncached_firmwar
}
rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
@ -1965,7 +1965,7 @@ upstream submission.
if (qla82xx_validate_firmware_blob(vha,
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -5636,8 +5636,6 @@ qla2x00_request_firmware(scsi_qla_host_t
@@ -5641,8 +5641,6 @@ qla2x00_request_firmware(scsi_qla_host_t
goto out;
if (request_firmware(&blob->fw, blob->name, &ha->pdev->dev)) {

View File

@ -1,65 +0,0 @@
From: Jim Mattson <jmattson@google.com>
Date: Mon, 12 Dec 2016 11:01:37 -0800
Subject: kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
Origin: https://git.kernel.org/linus/ef85b67385436ddc1998f45f1d6a210f935b3388
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jmattson@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/vmx.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c41d7ffdda5a..24db5fb6f575 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1389,10 +1389,10 @@ static inline bool nested_cpu_has_posted_intr(struct vmcs12 *vmcs12)
return vmcs12->pin_based_vm_exec_control & PIN_BASED_POSTED_INTR;
}
-static inline bool is_exception(u32 intr_info)
+static inline bool is_nmi(u32 intr_info)
{
return (intr_info & (INTR_INFO_INTR_TYPE_MASK | INTR_INFO_VALID_MASK))
- == (INTR_TYPE_HARD_EXCEPTION | INTR_INFO_VALID_MASK);
+ == (INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK);
}
static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
@@ -5728,7 +5728,7 @@ static int handle_exception(struct kvm_vcpu *vcpu)
if (is_machine_check(intr_info))
return handle_machine_check(vcpu);
- if ((intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR)
+ if (is_nmi(intr_info))
return 1; /* already handled by vmx_vcpu_run() */
if (is_no_device(intr_info)) {
@@ -8170,7 +8170,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
switch (exit_reason) {
case EXIT_REASON_EXCEPTION_NMI:
- if (!is_exception(intr_info))
+ if (is_nmi(intr_info))
return false;
else if (is_page_fault(intr_info))
return enable_ept;
@@ -8765,8 +8765,7 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx)
kvm_machine_check();
/* We need to handle NMIs before interrupts are enabled */
- if ((exit_intr_info & INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI_INTR &&
- (exit_intr_info & INTR_INFO_VALID_MASK)) {
+ if (is_nmi(exit_intr_info)) {
kvm_before_handle_nmi(&vmx->vcpu);
asm("int $2");
kvm_after_handle_nmi(&vmx->vcpu);
--
2.11.0

View File

@ -1,48 +0,0 @@
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Fri, 16 Dec 2016 13:42:06 -0500
Subject: sg_write()/bsg_write() is not fit to be called under KERNEL_DS
Origin: https://git.kernel.org/linus/128394eff343fc6d2f32172f03e24829539c5835
Both damn things interpret userland pointers embedded into the payload;
worse, they are actually traversing those. Leaving aside the bad
API design, this is very much _not_ safe to call with KERNEL_DS.
Bail out early if that happens.
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
block/bsg.c | 3 +++
drivers/scsi/sg.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/block/bsg.c b/block/bsg.c
index 8a05a404ae70..a57046de2f07 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -655,6 +655,9 @@ bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
dprintk("%s: write %Zd bytes\n", bd->name, count);
+ if (unlikely(segment_eq(get_fs(), KERNEL_DS)))
+ return -EINVAL;
+
bsg_set_block(bd, file);
bytes_written = 0;
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 070332eb41f3..dbe5b4b95df0 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -581,6 +581,9 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
sg_io_hdr_t *hp;
unsigned char cmnd[SG_MAX_CDB_SIZE];
+ if (unlikely(segment_eq(get_fs(), KERNEL_DS)))
+ return -EINVAL;
+
if ((!(sfp = (Sg_fd *) filp->private_data)) || (!(sdp = sfp->parentdp)))
return -ENXIO;
SCSI_LOG_TIMEOUT(3, sg_printk(KERN_INFO, sdp,
--
2.11.0

View File

@ -1,69 +0,0 @@
From: Nicholas Piggin <npiggin@gmail.com>
Date: Mon, 28 Nov 2016 12:42:26 +1100
Subject: powerpc/boot: Request no dynamic linker for boot wrapper
Origin: https://git.kernel.org/linus/ff45000fcb56b5b0f1a14a865d3541746d838a0a
Bug-Debian: https://bugs.debian.org/848851
The boot wrapper performs its own relocations and does not require
PT_INTERP segment. However currently we don't tell the linker that.
Prior to binutils 2.28 that works OK. But since binutils commit
1a9ccd70f9a7 ("Fix the linker so that it will not silently generate ELF
binaries with invalid program headers. Fix readelf to report such
invalid binaries.") binutils tries to create a program header segment
due to PT_INTERP, and the link fails because there is no space for it:
ld: arch/powerpc/boot/zImage.pseries: Not enough room for program headers, try linking with -N
ld: final link failed: Bad value
So tell the linker not to do that, by passing --no-dynamic-linker.
Cc: stable@vger.kernel.org
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Drop dependency on ld-version.sh and massage change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/boot/wrapper | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -181,6 +181,28 @@ case "$elfformat" in
elf32-powerpc) format=elf32ppc ;;
esac
+ld_version()
+{
+ # Poached from scripts/ld-version.sh, but we don't want to call that because
+ # this script (wrapper) is distributed separately from the kernel source.
+ # Extract linker version number from stdin and turn into single number.
+ awk '{
+ gsub(".*\\)", "");
+ gsub(".*version ", "");
+ gsub("-.*", "");
+ split($1,a, ".");
+ print a[1]*100000000 + a[2]*1000000 + a[3]*10000;
+ exit
+ }'
+}
+
+# Do not include PT_INTERP segment when linking pie. Non-pie linking
+# just ignores this option.
+LD_VERSION=$(${CROSS}ld --version | ld_version)
+LD_NO_DL_MIN_VERSION=$(echo 2.26 | ld_version)
+if [ "$LD_VERSION" -ge "$LD_NO_DL_MIN_VERSION" ] ; then
+ nodl="--no-dynamic-linker"
+fi
platformo=$object/"$platform".o
lds=$object/zImage.lds
@@ -446,7 +468,7 @@ if [ "$platform" != "miboot" ]; then
text_start="-Ttext $link_address"
fi
#link everything
- ${CROSS}ld -m $format -T $lds $text_start $pie -o "$ofile" \
+ ${CROSS}ld -m $format -T $lds $text_start $pie $nodl -o "$ofile" \
$platformo $tmp $object/wrapper.a
rm $tmp
fi

View File

@ -1,55 +0,0 @@
Subject: sc16is7xx: Drop bogus use of IRQF_ONESHOT
From: Josh Cartwright <joshc@ni.com>
Date: Thu, 18 Feb 2016 11:26:12 -0600
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.9/older/patches-4.9-rt1.tar.xz
The use of IRQF_ONESHOT when registering an interrupt handler with
request_irq() is non-sensical.
Not only that, it also prevents the handler from being threaded when it
otherwise should be w/ IRQ_FORCED_THREADING is enabled. This causes the
following deadlock observed by Sean Nyekjaer on -rt:
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[..]
rt_spin_lock_slowlock from (queue_kthread_work+0x18/0x74)
queue_kthread_work) from (sc16is7xx_irq+0x10/0x18 [sc16is7xx])
sc16is7xx_irq [sc16is7xx]) from (handle_irq_event_percpu+0x70/0x158)
handle_irq_event_percpu) from (handle_irq_event+0x68/0xa8)
handle_irq_event) from (handle_level_irq+0x10c/0x184)
handle_level_irq) from (generic_handle_irq+0x2c/0x3c)
generic_handle_irq) from (mxc_gpio_irq_handler+0x3c/0x108)
mxc_gpio_irq_handler) from (mx3_gpio_irq_handler+0x80/0xcc)
mx3_gpio_irq_handler) from (generic_handle_irq+0x2c/0x3c)
generic_handle_irq) from (__handle_domain_irq+0x7c/0xe8)
__handle_domain_irq) from (gic_handle_irq+0x24/0x5c)
gic_handle_irq) from (__irq_svc+0x40/0x88)
(__irq_svc) from (rt_spin_unlock+0x1c/0x68)
(rt_spin_unlock) from (kthread_worker_fn+0x104/0x17c)
(kthread_worker_fn) from (kthread+0xd0/0xe8)
(kthread) from (ret_from_fork+0x14/0x2c)
Fixes: 9e6f4ca3e567 ("sc16is7xx: use kthread_worker for tx_work and irq")
Reported-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Cc: linux-rt-users@vger.kernel.org
Cc: Jakub Kicinski <moorray3@wp.pl>
Cc: stable@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Link: http://lkml.kernel.org/r/1455816372-13989-1-git-send-email-joshc@ni.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/tty/serial/sc16is7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1264,7 +1264,7 @@ static int sc16is7xx_probe(struct device
/* Setup interrupt */
ret = devm_request_irq(dev, irq, sc16is7xx_irq,
- IRQF_ONESHOT | flags, dev_name(dev), s);
+ flags, dev_name(dev), s);
if (!ret)
return 0;

View File

@ -46,7 +46,6 @@ bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
# Arch bug fixes
bugfix/powerpc/powerpc-boot-request-no-dynamic-linker-for-boot-wrap.patch
# Arch features
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch
@ -64,7 +63,6 @@ bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
bugfix/all/kbuild-do-not-use-hyphen-in-exported-variable-name.patch
bugfix/all/ext4-fix-bug-838544.patch
bugfix/all/mm-memcontrol-use-special-workqueue-for-creating-per-memcg-caches.patch
bugfix/all/docs-sphinx-extensions-make-rstFlatTable-work-with-d.patch
# Miscellaneous features
@ -104,8 +102,6 @@ bugfix/alpha/revert-alpha-move-exports-to-actual-definitions.patch
bugfix/powerpc/powerpc-remove-mac-on-linux-hooks.patch
bugfix/powerpc/powerpc-fix-missing-crcs-add-yet-more-asm-prototypes.patch
bugfix/all/module-disable-matching-missing-version-crc.patch
bugfix/all/sg_write-bsg_write-is-not-fit-to-be-called-under-KER.patch
bugfix/all/kvm-nVMX-Allow-L1-to-intercept-software-exceptions-B.patch
# ABI maintenance

View File

@ -14,7 +14,6 @@ features/all/rt/timer-make-the-base-lock-raw.patch
############################################################
# Stuff broken upstream, patches submitted
############################################################
features/all/rt/sc16is7xx_Drop_bogus_use_of_IRQF_ONESHOT.patch
# Those two should vanish soon (not use PIT during bootup)
features/all/rt/at91_dont_enable_disable_clock.patch