This is a note to let you know that I've just added the patch titled
sctp: do not free asoc when it is already dead in sctp_sendmsg
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Xin Long <lucien.xin(a)gmail.com>
Date: Wed, 15 Nov 2017 16:55:54 +0800
Subject: sctp: do not free asoc when it is already dead in sctp_sendmsg
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit ca3af4dd28cff4e7216e213ba3b671fbf9f84758 ]
Now in sctp_sendmsg sctp_wait_for_sndbuf could schedule out without
holding sock sk. It means the current asoc can be freed elsewhere,
like when receiving an abort packet.
If the asoc is just created in sctp_sendmsg and sctp_wait_for_sndbuf
returns err, the asoc will be freed again due to new_asoc is not nil.
An use-after-free issue would be triggered by this.
This patch is to fix it by setting new_asoc with nil if the asoc is
already dead when cpu schedules back, so that it will not be freed
again in sctp_sendmsg.
v1->v2:
set new_asoc as nil in sctp_sendmsg instead of sctp_wait_for_sndbuf.
Suggested-by: Neil Horman <nhorman(a)tuxdriver.com>
Reported-by: Dmitry Vyukov <dvyukov(a)google.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: Neil Horman <nhorman(a)tuxdriver.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/socket.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1958,8 +1958,14 @@ static int sctp_sendmsg(struct sock *sk,
timeo = sock_sndtimeo(sk, msg->msg_flags & MSG_DONTWAIT);
if (!sctp_wspace(asoc)) {
err = sctp_wait_for_sndbuf(asoc, &timeo, msg_len);
- if (err)
+ if (err) {
+ if (err == -ESRCH) {
+ /* asoc is already dead. */
+ new_asoc = NULL;
+ err = -EPIPE;
+ }
goto out_free;
+ }
}
/* If an address is passed with the sendto/sendmsg call, it is used
@@ -7457,10 +7463,11 @@ static int sctp_wait_for_sndbuf(struct s
for (;;) {
prepare_to_wait_exclusive(&asoc->wait, &wait,
TASK_INTERRUPTIBLE);
+ if (asoc->base.dead)
+ goto do_dead;
if (!*timeo_p)
goto do_nonblock;
- if (sk->sk_err || asoc->state >= SCTP_STATE_SHUTDOWN_PENDING ||
- asoc->base.dead)
+ if (sk->sk_err || asoc->state >= SCTP_STATE_SHUTDOWN_PENDING)
goto do_error;
if (signal_pending(current))
goto do_interrupted;
@@ -7485,6 +7492,10 @@ out:
return err;
+do_dead:
+ err = -ESRCH;
+ goto out;
+
do_error:
err = -EPIPE;
goto out;
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
queue-4.9/route-also-update-fnhe_genid-when-updating-a-route-cache.patch
queue-4.9/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch
queue-4.9/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
This is a note to let you know that I've just added the patch titled
scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-lpfc-fix-crash-during-hardware-error-recovery-on-sli3-adapters.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: James Smart <jsmart2021(a)gmail.com>
Date: Sat, 4 Mar 2017 09:30:25 -0800
Subject: scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
From: James Smart <jsmart2021(a)gmail.com>
[ Upstream commit 5d181531bc6169e19a02a27d202cf0e982db9d0e ]
if REG_VPI fails, the driver was incorrectly issuing INIT_VFI
(a SLI4 command) on a SLI3 adapter.
Signed-off-by: Dick Kennedy <dick.kennedy(a)broadcom.com>
Signed-off-by: James Smart <james.smart(a)broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/lpfc/lpfc_els.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -8185,11 +8185,17 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba
spin_lock_irq(shost->host_lock);
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
spin_unlock_irq(shost->host_lock);
- if (vport->port_type == LPFC_PHYSICAL_PORT
- && !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG))
- lpfc_issue_init_vfi(vport);
- else
+ if (mb->mbxStatus == MBX_NOT_FINISHED)
+ break;
+ if ((vport->port_type == LPFC_PHYSICAL_PORT) &&
+ !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG)) {
+ if (phba->sli_rev == LPFC_SLI_REV4)
+ lpfc_issue_init_vfi(vport);
+ else
+ lpfc_initial_flogi(vport);
+ } else {
lpfc_initial_fdisc(vport);
+ }
break;
}
} else {
Patches currently in stable-queue which might be from jsmart2021(a)gmail.com are
queue-4.9/scsi-lpfc-fix-crash-during-hardware-error-recovery-on-sli3-adapters.patch
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Fix ql_dump_buffer
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-fix-ql_dump_buffer.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Joe Perches <joe(a)perches.com>
Date: Thu, 2 Mar 2017 17:14:47 -0800
Subject: scsi: qla2xxx: Fix ql_dump_buffer
From: Joe Perches <joe(a)perches.com>
[ Upstream commit 23456565acf6d452e0368f7380aecd584c019c67 ]
Recent printk changes for KERN_CONT cause this logging to be defectively
emitted on multiple lines. Fix it.
Also reduces object size a trivial amount.
$ size drivers/scsi/qla2xxx/qla_dbg.o*
text data bss dec hex filename
39125 0 0 39125 98d5 drivers/scsi/qla2xxx/qla_dbg.o.new
39164 0 0 39164 98fc drivers/scsi/qla2xxx/qla_dbg.o.old
Signed-off-by: Joe Perches <joe(a)perches.com>
Acked-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_dbg.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -2707,13 +2707,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_
"%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
ql_dbg(level, vha, id,
"----- -----------------------------------------------\n");
- for (cnt = 0; cnt < size; cnt++, buf++) {
- if (cnt % 16 == 0)
- ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
- printk(" %02x", *buf);
- if (cnt % 16 == 15)
- printk("\n");
+ for (cnt = 0; cnt < size; cnt += 16) {
+ ql_dbg(level, vha, id, "%04x: ", cnt);
+ print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
+ buf + cnt, min(16U, size - cnt), false);
}
- if (cnt % 16 != 0)
- printk("\n");
}
Patches currently in stable-queue which might be from joe(a)perches.com are
queue-4.9/scsi-qla2xxx-fix-ql_dump_buffer.patch
This is a note to let you know that I've just added the patch titled
sched/fair: Make select_idle_cpu() more aggressive
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
sched-fair-make-select_idle_cpu-more-aggressive.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Peter Zijlstra <peterz(a)infradead.org>
Date: Wed, 1 Mar 2017 11:24:35 +0100
Subject: sched/fair: Make select_idle_cpu() more aggressive
From: Peter Zijlstra <peterz(a)infradead.org>
[ Upstream commit 4c77b18cf8b7ab37c7d5737b4609010d2ceec5f0 ]
Kitsunyan reported desktop latency issues on his Celeron 887 because
of commit:
1b568f0aabf2 ("sched/core: Optimize SCHED_SMT")
... even though his CPU doesn't do SMT.
The effect of running the SMT code on a !SMT part is basically a more
aggressive select_idle_cpu(). Removing the avg condition fixed things
for him.
I also know FB likes this test gone, even though other workloads like
having it.
For now, take it out by default, until we get a better idea.
Reported-by: kitsunyan <kitsunyan(a)inbox.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Cc: Chris Mason <clm(a)fb.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Mike Galbraith <efault(a)gmx.de>
Cc: Mike Galbraith <umgwanakikbuti(a)gmail.com>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: linux-kernel(a)vger.kernel.org
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
kernel/sched/fair.c | 2 +-
kernel/sched/features.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5451,7 +5451,7 @@ static int select_idle_cpu(struct task_s
* Due to large variance we need a large fuzz factor; hackbench in
* particularly is sensitive here.
*/
- if ((avg_idle / 512) < avg_cost)
+ if (sched_feat(SIS_AVG_CPU) && (avg_idle / 512) < avg_cost)
return -1;
time = local_clock();
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -51,6 +51,11 @@ SCHED_FEAT(NONTASK_CAPACITY, true)
*/
SCHED_FEAT(TTWU_QUEUE, true)
+/*
+ * When doing wakeups, attempt to limit superfluous scans of the LLC domain.
+ */
+SCHED_FEAT(SIS_AVG_CPU, false)
+
#ifdef HAVE_RT_PUSH_IPI
/*
* In order to avoid a thundering herd attack of CPUs that are
Patches currently in stable-queue which might be from peterz(a)infradead.org are
queue-4.9/smp-hotplug-move-step-cpuhp_ap_smpcfd_dying-to-the-correct-place.patch
queue-4.9/efi-esrt-use-memunmap-instead-of-kfree-to-free-the-remapping.patch
queue-4.9/x86-hpet-prevent-might-sleep-splat-on-resume.patch
queue-4.9/efi-move-some-sysfs-files-to-be-read-only-by-root.patch
queue-4.9/x86-platform-uv-bau-fix-hub-errors-by-remove-initial-write-to-sw-ack-register.patch
queue-4.9/x86-mpx-selftests-fix-up-weird-arrays.patch
queue-4.9/blk-mq-initialize-mq-kobjects-in-blk_mq_init_allocated_queue.patch
queue-4.9/x86-selftests-add-clobbers-for-int80-on-x86_64.patch
queue-4.9/jump_label-invoke-jump_label_test-via-early_initcall.patch
queue-4.9/sched-fair-make-select_idle_cpu-more-aggressive.patch
This is a note to let you know that I've just added the patch titled
route: update fnhe_expires for redirect when the fnhe exists
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Xin Long <lucien.xin(a)gmail.com>
Date: Fri, 17 Nov 2017 14:27:06 +0800
Subject: route: update fnhe_expires for redirect when the fnhe exists
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit e39d5246111399dbc6e11cd39fd8580191b86c47 ]
Now when creating fnhe for redirect, it sets fnhe_expires for this
new route cache. But when updating the exist one, it doesn't do it.
It will cause this fnhe never to be expired.
Paolo already noticed it before, in Jianlin's test case, it became
even worse:
When ip route flush cache, the old fnhe is not to be removed, but
only clean it's members. When redirect comes again, this fnhe will
be found and updated, but never be expired due to fnhe_expires not
being set.
So fix it by simply updating fnhe_expires even it's for redirect.
Fixes: aee06da6726d ("ipv4: use seqlock for nh_exceptions")
Reported-by: Jianlin Shi <jishi(a)redhat.com>
Acked-by: Hannes Frederic Sowa <hannes(a)stressinduktion.org>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/route.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -662,10 +662,9 @@ static void update_or_create_fnhe(struct
fnhe->fnhe_genid = genid;
if (gw)
fnhe->fnhe_gw = gw;
- if (pmtu) {
+ if (pmtu)
fnhe->fnhe_pmtu = pmtu;
- fnhe->fnhe_expires = max(1UL, expires);
- }
+ fnhe->fnhe_expires = max(1UL, expires);
/* Update all cached dsts too */
rt = rcu_dereference(fnhe->fnhe_rth_input);
if (rt)
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
queue-4.9/route-also-update-fnhe_genid-when-updating-a-route-cache.patch
queue-4.9/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch
queue-4.9/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
This is a note to let you know that I've just added the patch titled
Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-spi-spi_fsl_dspi-should-depend-on-has_dma.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Thu, 7 Dec 2017 23:23:42 -0500
Subject: Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit dadab2d4e3cf708ceba22ecddd94aedfecb39199.
Not required on < 4.10.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/spi/Kconfig | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -365,7 +365,6 @@ config SPI_FSL_SPI
config SPI_FSL_DSPI
tristate "Freescale DSPI controller"
select REGMAP_MMIO
- depends on HAS_DMA
depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
help
This enables support for the Freescale DSPI controller in master
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/xfrm-copy-policy-family-in-clone_policy.patch
queue-4.9/scsi-lpfc-fix-crash-during-hardware-error-recovery-on-sli3-adapters.patch
queue-4.9/ibmvnic-allocate-number-of-rx-tx-buffers-agreed-on-by-firmware.patch
queue-4.9/atm-horizon-fix-irq-release-error.patch
queue-4.9/powerpc-fix-compiling-a-be-kernel-with-a-powerpc64le-toolchain.patch
queue-4.9/ipv6-reorder-icmpv6_init-and-ip6_mr_init.patch
queue-4.9/ipvlan-fix-ipv6-outbound-device.patch
queue-4.9/spi_ks8995-regs_size-incorrect-for-some-devices.patch
queue-4.9/arm-omap2-release-device-node-after-it-is-no-longer-needed.patch
queue-4.9/kvm-nvmx-reset-nested_run_pending-if-the-vcpu-is-going-to-be-reset.patch
queue-4.9/usb-dwc3-gadget-fix-system-suspend-resume-on-ti-platforms.patch
queue-4.9/arm-8657-1-uaccess-consistently-check-object-sizes.patch
queue-4.9/rdma-cxgb4-annotate-r2-and-stag-as-__be32.patch
queue-4.9/hid-chicony-add-support-for-another-asus-zen-aio-keyboard.patch
queue-4.9/bnx2x-fix-detection-of-vlan-filtering-feature-for-vf.patch
queue-4.9/netfilter-don-t-track-fragmented-packets.patch
queue-4.9/lirc-fix-dead-lock-between-open-and-wakeup_filter.patch
queue-4.9/block-wake-up-all-tasks-blocked-in-get_request.patch
queue-4.9/asoc-rcar-avoid-ssi_modex-settings-for-ssi8.patch
queue-4.9/kvm-nvmx-vmclear-should-not-cause-the-vcpu-to-shut-down.patch
queue-4.9/arm-omap2-fix-device-node-reference-counts.patch
queue-4.9/mac80211_hwsim-fix-memory-leak-in-hwsim_new_radio_nl.patch
queue-4.9/axonram-fix-gendisk-handling.patch
queue-4.9/kvm-arm-arm64-vgic-fix-command-handling-while-its-being-disabled.patch
queue-4.9/powerpc-64-fix-checksum-folding-in-csum_add.patch
queue-4.9/revert-spi-spi_fsl_dspi-should-depend-on-has_dma.patch
queue-4.9/powerpc-powernv-ioda2-gracefully-fail-if-too-many-tce-levels-requested.patch
queue-4.9/bpf-fix-lockdep-splat.patch
queue-4.9/usb-gadgetfs-fix-a-potential-memory-leak-in-dev_config.patch
queue-4.9/spi_ks8995-fix-bug-key-accdaa28-not-in-.data.patch
queue-4.9/drivers-rapidio-devices-rio_mport_cdev.c-fix-resource-leak-in-error-handling-path-in-rio_dma_transfer.patch
queue-4.9/bnx2x-fix-possible-overrun-of-vfpf-multicast-addresses-array.patch
queue-4.9/bnx2x-do-not-rollback-vf-mac-vlan-filters-we-did-not-configure.patch
queue-4.9/powerpc-64-invalidate-process-table-caching-after-setting-process-table.patch
queue-4.9/sunrpc-fix-rpc_task_begin-trace-point.patch
queue-4.9/clk-uniphier-fix-dapll2-clock-rate-of-pro5.patch
queue-4.9/arm-kvm-survive-unknown-traps-from-guests.patch
queue-4.9/crypto-s5p-sss-fix-completing-crypto-request-in-irq-handler.patch
queue-4.9/ib-mlx5-assign-send-cq-and-recv-cq-of-umr-qp.patch
queue-4.9/gpio-altera-use-handle_level_irq-when-configured-as-a-level_high.patch
queue-4.9/lib-genalloc.c-make-the-avail-variable-an-atomic_long_t.patch
queue-4.9/dt-bindings-usb-fix-reg-property-port-number-range.patch
queue-4.9/arm-omap2-gpmc-onenand-propagate-error-on-initialization-failure.patch
queue-4.9/afs-connect-up-the-cb.probeuuid.patch
queue-4.9/drm-amd-amdgpu-fix-console-deadlock-if-late-init-failed.patch
queue-4.9/module-set-__jump_table-alignment-to-8.patch
queue-4.9/usb-gadget-pxa27x-test-for-a-valid-argument-pointer.patch
queue-4.9/x86-hpet-prevent-might-sleep-splat-on-resume.patch
queue-4.9/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
queue-4.9/edac-i5000-i5400-fix-definition-of-nrecmemb-register.patch
queue-4.9/md-free-unused-memory-after-bitmap-resize.patch
queue-4.9/x86-platform-uv-bau-fix-hub-errors-by-remove-initial-write-to-sw-ack-register.patch
queue-4.9/x86-mpx-selftests-fix-up-weird-arrays.patch
queue-4.9/libata-drop-warn-from-protocol-error-in-ata_sff_qc_issue.patch
queue-4.9/nfs-fix-a-typo-in-nfs_rename.patch
queue-4.9/ibmvnic-fix-overflowing-firmware-hardware-tx-queue.patch
queue-4.9/blk-mq-initialize-mq-kobjects-in-blk_mq_init_allocated_queue.patch
queue-4.9/audit-ensure-that-audit-1-actually-enables-audit-for-pid-1.patch
queue-4.9/sparc64-mm-set-fields-in-deferred-pages.patch
queue-4.9/zram-set-physical-queue-limits-to-avoid-array-out-of-bounds-accesses.patch
queue-4.9/route-also-update-fnhe_genid-when-updating-a-route-cache.patch
queue-4.9/selftest-powerpc-fix-false-failures-for-skipped-tests.patch
queue-4.9/rds-tcp-sequence-teardown-of-listen-and-acceptor-sockets-to-avoid-races.patch
queue-4.9/usb-gadget-udc-net2280-fix-tmp-reusage-in-net2280-driver.patch
queue-4.9/xfs-fix-forgotten-rcu-read-unlock-when-skipping-inode-reclaim.patch
queue-4.9/x86-selftests-add-clobbers-for-int80-on-x86_64.patch
queue-4.9/gre6-use-log_ecn_error-module-parameter-in-ip6_tnl_rcv.patch
queue-4.9/edac-i5000-i5400-fix-use-of-mtr_dram_width-macro.patch
queue-4.9/jump_label-invoke-jump_label_test-via-early_initcall.patch
queue-4.9/workqueue-trigger-warn-if-queue_delayed_work-is-called-with-null-wq.patch
queue-4.9/irqchip-crossbar-fix-incorrect-type-of-register-size.patch
queue-4.9/zsmalloc-calling-zs_map_object-from-irq-is-a-bug.patch
queue-4.9/bnx2x-prevent-crash-when-accessing-ptp-with-interface-down.patch
queue-4.9/vti6-don-t-report-path-mtu-below-ipv6_min_mtu.patch
queue-4.9/sched-fair-make-select_idle_cpu-more-aggressive.patch
queue-4.9/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch
queue-4.9/kbuild-do-not-call-cc-option-before-kbuild_cflags-initialization.patch
queue-4.9/arm64-kvm-survive-unknown-traps-from-guests.patch
queue-4.9/coccinelle-fix-parallel-build-with-check-scripts-coccicheck.patch
queue-4.9/dynamic-debug-howto-fix-optional-omitted-ending-line-number-to-be-large-instead-of-0.patch
queue-4.9/scsi-qla2xxx-fix-ql_dump_buffer.patch
queue-4.9/i2c-riic-fix-restart-condition.patch
queue-4.9/ib-mlx4-increase-maximal-message-size-under-ud-qp.patch
queue-4.9/usb-gadget-configs-plug-memory-leak.patch
queue-4.9/revert-drm-armada-fix-compile-fail.patch
queue-4.9/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
queue-4.9/kbuild-pkg-use-transform-option-to-prefix-paths-in-tar.patch
This is a note to let you know that I've just added the patch titled
route: also update fnhe_genid when updating a route cache
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
route-also-update-fnhe_genid-when-updating-a-route-cache.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Xin Long <lucien.xin(a)gmail.com>
Date: Fri, 17 Nov 2017 14:27:18 +0800
Subject: route: also update fnhe_genid when updating a route cache
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit cebe84c6190d741045a322f5343f717139993c08 ]
Now when ip route flush cache and it turn out all fnhe_genid != genid.
If a redirect/pmtu icmp packet comes and the old fnhe is found and all
it's members but fnhe_genid will be updated.
Then next time when it looks up route and tries to rebind this fnhe to
the new dst, the fnhe will be flushed due to fnhe_genid != genid. It
causes this redirect/pmtu icmp packet acutally not to be applied.
This patch is to also reset fnhe_genid when updating a route cache.
Fixes: 5aad1de5ea2c ("ipv4: use separate genid for next hop exceptions")
Acked-by: Hannes Frederic Sowa <hannes(a)stressinduktion.org>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/route.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -630,9 +630,12 @@ static void update_or_create_fnhe(struct
struct fnhe_hash_bucket *hash;
struct fib_nh_exception *fnhe;
struct rtable *rt;
+ u32 genid, hval;
unsigned int i;
int depth;
- u32 hval = fnhe_hashfun(daddr);
+
+ genid = fnhe_genid(dev_net(nh->nh_dev));
+ hval = fnhe_hashfun(daddr);
spin_lock_bh(&fnhe_lock);
@@ -655,6 +658,8 @@ static void update_or_create_fnhe(struct
}
if (fnhe) {
+ if (fnhe->fnhe_genid != genid)
+ fnhe->fnhe_genid = genid;
if (gw)
fnhe->fnhe_gw = gw;
if (pmtu) {
@@ -679,7 +684,7 @@ static void update_or_create_fnhe(struct
fnhe->fnhe_next = hash->chain;
rcu_assign_pointer(hash->chain, fnhe);
}
- fnhe->fnhe_genid = fnhe_genid(dev_net(nh->nh_dev));
+ fnhe->fnhe_genid = genid;
fnhe->fnhe_daddr = daddr;
fnhe->fnhe_gw = gw;
fnhe->fnhe_pmtu = pmtu;
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
queue-4.9/route-also-update-fnhe_genid-when-updating-a-route-cache.patch
queue-4.9/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch
queue-4.9/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
This is a note to let you know that I've just added the patch titled
Revert "drm/armada: Fix compile fail"
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
revert-drm-armada-fix-compile-fail.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Sasha Levin <alexander.levin(a)verizon.com>
Date: Thu, 7 Dec 2017 23:21:06 -0500
Subject: Revert "drm/armada: Fix compile fail"
From: Sasha Levin <alexander.levin(a)verizon.com>
This reverts commit 82f260d472c3b4dbb7324624e395c3e91f73a040.
Not required on < 4.10.
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/gpu/drm/armada/Makefile | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/gpu/drm/armada/Makefile
+++ b/drivers/gpu/drm/armada/Makefile
@@ -4,5 +4,3 @@ armada-y += armada_510.o
armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
obj-$(CONFIG_DRM_ARMADA) := armada.o
-
-CFLAGS_armada_trace.o := -I$(src)
Patches currently in stable-queue which might be from alexander.levin(a)verizon.com are
queue-4.9/xfrm-copy-policy-family-in-clone_policy.patch
queue-4.9/scsi-lpfc-fix-crash-during-hardware-error-recovery-on-sli3-adapters.patch
queue-4.9/ibmvnic-allocate-number-of-rx-tx-buffers-agreed-on-by-firmware.patch
queue-4.9/atm-horizon-fix-irq-release-error.patch
queue-4.9/powerpc-fix-compiling-a-be-kernel-with-a-powerpc64le-toolchain.patch
queue-4.9/ipv6-reorder-icmpv6_init-and-ip6_mr_init.patch
queue-4.9/ipvlan-fix-ipv6-outbound-device.patch
queue-4.9/spi_ks8995-regs_size-incorrect-for-some-devices.patch
queue-4.9/arm-omap2-release-device-node-after-it-is-no-longer-needed.patch
queue-4.9/kvm-nvmx-reset-nested_run_pending-if-the-vcpu-is-going-to-be-reset.patch
queue-4.9/usb-dwc3-gadget-fix-system-suspend-resume-on-ti-platforms.patch
queue-4.9/arm-8657-1-uaccess-consistently-check-object-sizes.patch
queue-4.9/rdma-cxgb4-annotate-r2-and-stag-as-__be32.patch
queue-4.9/hid-chicony-add-support-for-another-asus-zen-aio-keyboard.patch
queue-4.9/bnx2x-fix-detection-of-vlan-filtering-feature-for-vf.patch
queue-4.9/netfilter-don-t-track-fragmented-packets.patch
queue-4.9/lirc-fix-dead-lock-between-open-and-wakeup_filter.patch
queue-4.9/block-wake-up-all-tasks-blocked-in-get_request.patch
queue-4.9/asoc-rcar-avoid-ssi_modex-settings-for-ssi8.patch
queue-4.9/kvm-nvmx-vmclear-should-not-cause-the-vcpu-to-shut-down.patch
queue-4.9/arm-omap2-fix-device-node-reference-counts.patch
queue-4.9/mac80211_hwsim-fix-memory-leak-in-hwsim_new_radio_nl.patch
queue-4.9/axonram-fix-gendisk-handling.patch
queue-4.9/kvm-arm-arm64-vgic-fix-command-handling-while-its-being-disabled.patch
queue-4.9/powerpc-64-fix-checksum-folding-in-csum_add.patch
queue-4.9/revert-spi-spi_fsl_dspi-should-depend-on-has_dma.patch
queue-4.9/powerpc-powernv-ioda2-gracefully-fail-if-too-many-tce-levels-requested.patch
queue-4.9/bpf-fix-lockdep-splat.patch
queue-4.9/usb-gadgetfs-fix-a-potential-memory-leak-in-dev_config.patch
queue-4.9/spi_ks8995-fix-bug-key-accdaa28-not-in-.data.patch
queue-4.9/drivers-rapidio-devices-rio_mport_cdev.c-fix-resource-leak-in-error-handling-path-in-rio_dma_transfer.patch
queue-4.9/bnx2x-fix-possible-overrun-of-vfpf-multicast-addresses-array.patch
queue-4.9/bnx2x-do-not-rollback-vf-mac-vlan-filters-we-did-not-configure.patch
queue-4.9/powerpc-64-invalidate-process-table-caching-after-setting-process-table.patch
queue-4.9/sunrpc-fix-rpc_task_begin-trace-point.patch
queue-4.9/clk-uniphier-fix-dapll2-clock-rate-of-pro5.patch
queue-4.9/arm-kvm-survive-unknown-traps-from-guests.patch
queue-4.9/crypto-s5p-sss-fix-completing-crypto-request-in-irq-handler.patch
queue-4.9/ib-mlx5-assign-send-cq-and-recv-cq-of-umr-qp.patch
queue-4.9/gpio-altera-use-handle_level_irq-when-configured-as-a-level_high.patch
queue-4.9/lib-genalloc.c-make-the-avail-variable-an-atomic_long_t.patch
queue-4.9/dt-bindings-usb-fix-reg-property-port-number-range.patch
queue-4.9/arm-omap2-gpmc-onenand-propagate-error-on-initialization-failure.patch
queue-4.9/afs-connect-up-the-cb.probeuuid.patch
queue-4.9/drm-amd-amdgpu-fix-console-deadlock-if-late-init-failed.patch
queue-4.9/module-set-__jump_table-alignment-to-8.patch
queue-4.9/usb-gadget-pxa27x-test-for-a-valid-argument-pointer.patch
queue-4.9/x86-hpet-prevent-might-sleep-splat-on-resume.patch
queue-4.9/route-update-fnhe_expires-for-redirect-when-the-fnhe-exists.patch
queue-4.9/edac-i5000-i5400-fix-definition-of-nrecmemb-register.patch
queue-4.9/md-free-unused-memory-after-bitmap-resize.patch
queue-4.9/x86-platform-uv-bau-fix-hub-errors-by-remove-initial-write-to-sw-ack-register.patch
queue-4.9/x86-mpx-selftests-fix-up-weird-arrays.patch
queue-4.9/libata-drop-warn-from-protocol-error-in-ata_sff_qc_issue.patch
queue-4.9/nfs-fix-a-typo-in-nfs_rename.patch
queue-4.9/ibmvnic-fix-overflowing-firmware-hardware-tx-queue.patch
queue-4.9/blk-mq-initialize-mq-kobjects-in-blk_mq_init_allocated_queue.patch
queue-4.9/audit-ensure-that-audit-1-actually-enables-audit-for-pid-1.patch
queue-4.9/sparc64-mm-set-fields-in-deferred-pages.patch
queue-4.9/zram-set-physical-queue-limits-to-avoid-array-out-of-bounds-accesses.patch
queue-4.9/route-also-update-fnhe_genid-when-updating-a-route-cache.patch
queue-4.9/selftest-powerpc-fix-false-failures-for-skipped-tests.patch
queue-4.9/rds-tcp-sequence-teardown-of-listen-and-acceptor-sockets-to-avoid-races.patch
queue-4.9/usb-gadget-udc-net2280-fix-tmp-reusage-in-net2280-driver.patch
queue-4.9/xfs-fix-forgotten-rcu-read-unlock-when-skipping-inode-reclaim.patch
queue-4.9/x86-selftests-add-clobbers-for-int80-on-x86_64.patch
queue-4.9/gre6-use-log_ecn_error-module-parameter-in-ip6_tnl_rcv.patch
queue-4.9/edac-i5000-i5400-fix-use-of-mtr_dram_width-macro.patch
queue-4.9/jump_label-invoke-jump_label_test-via-early_initcall.patch
queue-4.9/workqueue-trigger-warn-if-queue_delayed_work-is-called-with-null-wq.patch
queue-4.9/irqchip-crossbar-fix-incorrect-type-of-register-size.patch
queue-4.9/zsmalloc-calling-zs_map_object-from-irq-is-a-bug.patch
queue-4.9/bnx2x-prevent-crash-when-accessing-ptp-with-interface-down.patch
queue-4.9/vti6-don-t-report-path-mtu-below-ipv6_min_mtu.patch
queue-4.9/sched-fair-make-select_idle_cpu-more-aggressive.patch
queue-4.9/sctp-use-the-right-sk-after-waking-up-from-wait_buf-sleep.patch
queue-4.9/kbuild-do-not-call-cc-option-before-kbuild_cflags-initialization.patch
queue-4.9/arm64-kvm-survive-unknown-traps-from-guests.patch
queue-4.9/coccinelle-fix-parallel-build-with-check-scripts-coccicheck.patch
queue-4.9/dynamic-debug-howto-fix-optional-omitted-ending-line-number-to-be-large-instead-of-0.patch
queue-4.9/scsi-qla2xxx-fix-ql_dump_buffer.patch
queue-4.9/i2c-riic-fix-restart-condition.patch
queue-4.9/ib-mlx4-increase-maximal-message-size-under-ud-qp.patch
queue-4.9/usb-gadget-configs-plug-memory-leak.patch
queue-4.9/revert-drm-armada-fix-compile-fail.patch
queue-4.9/sctp-do-not-free-asoc-when-it-is-already-dead-in-sctp_sendmsg.patch
queue-4.9/kbuild-pkg-use-transform-option-to-prefix-paths-in-tar.patch
This is a note to let you know that I've just added the patch titled
rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
rds-tcp-sequence-teardown-of-listen-and-acceptor-sockets-to-avoid-races.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Sowmini Varadhan <sowmini.varadhan(a)oracle.com>
Date: Sat, 4 Mar 2017 08:57:35 -0800
Subject: rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races
From: Sowmini Varadhan <sowmini.varadhan(a)oracle.com>
[ Upstream commit b21dd4506b71bdb9c5a20e759255cd2513ea7ebe ]
Commit a93d01f5777e ("RDS: TCP: avoid bad page reference in
rds_tcp_listen_data_ready") added the function
rds_tcp_listen_sock_def_readable() to handle the case when a
partially set-up acceptor socket drops into rds_tcp_listen_data_ready().
However, if the listen socket (rtn->rds_tcp_listen_sock) is itself going
through a tear-down via rds_tcp_listen_stop(), the (*ready)() will be
null and we would hit a panic of the form
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: (null)
:
? rds_tcp_listen_data_ready+0x59/0xb0 [rds_tcp]
tcp_data_queue+0x39d/0x5b0
tcp_rcv_established+0x2e5/0x660
tcp_v4_do_rcv+0x122/0x220
tcp_v4_rcv+0x8b7/0x980
:
In the above case, it is not fatal to encounter a NULL value for
ready- we should just drop the packet and let the flush of the
acceptor thread finish gracefully.
In general, the tear-down sequence for listen() and accept() socket
that is ensured by this commit is:
rtn->rds_tcp_listen_sock = NULL; /* prevent any new accepts */
In rds_tcp_listen_stop():
serialize with, and prevent, further callbacks using lock_sock()
flush rds_wq
flush acceptor workq
sock_release(listen socket)
Signed-off-by: Sowmini Varadhan <sowmini.varadhan(a)oracle.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/rds/tcp.c | 15 ++++++++++-----
net/rds/tcp.h | 2 +-
net/rds/tcp_listen.c | 9 +++++++--
3 files changed, 18 insertions(+), 8 deletions(-)
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -478,9 +478,10 @@ static void __net_exit rds_tcp_exit_net(
* we do need to clean up the listen socket here.
*/
if (rtn->rds_tcp_listen_sock) {
- rds_tcp_listen_stop(rtn->rds_tcp_listen_sock);
+ struct socket *lsock = rtn->rds_tcp_listen_sock;
+
rtn->rds_tcp_listen_sock = NULL;
- flush_work(&rtn->rds_tcp_accept_w);
+ rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_w);
}
}
@@ -517,10 +518,10 @@ static void rds_tcp_kill_sock(struct net
struct rds_tcp_connection *tc, *_tc;
LIST_HEAD(tmp_list);
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
+ struct socket *lsock = rtn->rds_tcp_listen_sock;
- rds_tcp_listen_stop(rtn->rds_tcp_listen_sock);
rtn->rds_tcp_listen_sock = NULL;
- flush_work(&rtn->rds_tcp_accept_w);
+ rds_tcp_listen_stop(lsock, &rtn->rds_tcp_accept_w);
spin_lock_irq(&rds_tcp_conn_lock);
list_for_each_entry_safe(tc, _tc, &rds_tcp_conn_list, t_tcp_node) {
struct net *c_net = read_pnet(&tc->t_cpath->cp_conn->c_net);
@@ -540,8 +541,12 @@ static void rds_tcp_kill_sock(struct net
void *rds_tcp_listen_sock_def_readable(struct net *net)
{
struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid);
+ struct socket *lsock = rtn->rds_tcp_listen_sock;
+
+ if (!lsock)
+ return NULL;
- return rtn->rds_tcp_listen_sock->sk->sk_user_data;
+ return lsock->sk->sk_user_data;
}
static int rds_tcp_dev_event(struct notifier_block *this,
--- a/net/rds/tcp.h
+++ b/net/rds/tcp.h
@@ -66,7 +66,7 @@ void rds_tcp_state_change(struct sock *s
/* tcp_listen.c */
struct socket *rds_tcp_listen_init(struct net *);
-void rds_tcp_listen_stop(struct socket *);
+void rds_tcp_listen_stop(struct socket *sock, struct work_struct *acceptor);
void rds_tcp_listen_data_ready(struct sock *sk);
int rds_tcp_accept_one(struct socket *sock);
int rds_tcp_keepalive(struct socket *sock);
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -227,6 +227,9 @@ void rds_tcp_listen_data_ready(struct so
* before it has been accepted and the accepter has set up their
* data_ready.. we only want to queue listen work for our listening
* socket
+ *
+ * (*ready)() may be null if we are racing with netns delete, and
+ * the listen socket is being torn down.
*/
if (sk->sk_state == TCP_LISTEN)
rds_tcp_accept_work(sk);
@@ -235,7 +238,8 @@ void rds_tcp_listen_data_ready(struct so
out:
read_unlock_bh(&sk->sk_callback_lock);
- ready(sk);
+ if (ready)
+ ready(sk);
}
struct socket *rds_tcp_listen_init(struct net *net)
@@ -275,7 +279,7 @@ out:
return NULL;
}
-void rds_tcp_listen_stop(struct socket *sock)
+void rds_tcp_listen_stop(struct socket *sock, struct work_struct *acceptor)
{
struct sock *sk;
@@ -296,5 +300,6 @@ void rds_tcp_listen_stop(struct socket *
/* wait for accepts to stop and close the socket */
flush_workqueue(rds_wq);
+ flush_work(acceptor);
sock_release(sock);
}
Patches currently in stable-queue which might be from sowmini.varadhan(a)oracle.com are
queue-4.9/rds-tcp-sequence-teardown-of-listen-and-acceptor-sockets-to-avoid-races.patch