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
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: 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 "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
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
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
powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested
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:
powerpc-powernv-ioda2-gracefully-fail-if-too-many-tce-levels-requested.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: Alexey Kardashevskiy <aik(a)ozlabs.ru>
Date: Wed, 22 Feb 2017 15:43:59 +1100
Subject: powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested
From: Alexey Kardashevskiy <aik(a)ozlabs.ru>
[ Upstream commit 7aafac11e308d37ed3c509829bb43d80c1811ac3 ]
The IODA2 specification says that a 64 DMA address cannot use top 4 bits
(3 are reserved and one is a "TVE select"); bottom page_shift bits
cannot be used for multilevel table addressing either.
The existing IODA2 table allocation code aligns the minimum TCE table
size to PAGE_SIZE so in the case of 64K system pages and 4K IOMMU pages,
we have 64-4-12=48 bits. Since 64K page stores 8192 TCEs, i.e. needs
13 bits, the maximum number of levels is 48/13 = 3 so we physically
cannot address more and EEH happens on DMA accesses.
This adds a check that too many levels were requested.
It is still possible to have 5 levels in the case of 4K system page size.
Signed-off-by: Alexey Kardashevskiy <aik(a)ozlabs.ru>
Acked-by: Gavin Shan <gwshan(a)linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -2623,6 +2623,9 @@ static long pnv_pci_ioda2_table_alloc_pa
level_shift = entries_shift + 3;
level_shift = max_t(unsigned, level_shift, PAGE_SHIFT);
+ if ((level_shift - 3) * levels + page_shift >= 60)
+ return -EINVAL;
+
/* Allocate TCE table */
addr = pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift,
levels, tce_table_size, &offset, &total_allocated);
Patches currently in stable-queue which might be from aik(a)ozlabs.ru are
queue-4.9/powerpc-powernv-ioda2-gracefully-fail-if-too-many-tce-levels-requested.patch
This is a note to let you know that I've just added the patch titled
RDMA/cxgb4: Annotate r2 and stag as __be32
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:
rdma-cxgb4-annotate-r2-and-stag-as-__be32.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: Leon Romanovsky <leon(a)kernel.org>
Date: Wed, 25 Oct 2017 23:10:19 +0300
Subject: RDMA/cxgb4: Annotate r2 and stag as __be32
From: Leon Romanovsky <leon(a)kernel.org>
[ Upstream commit 7d7d065a5eec7e218174d5c64a9f53f99ffdb119 ]
Chelsio cxgb4 HW is big-endian, hence there is need to properly
annotate r2 and stag fields as __be32 and not __u32 to fix the
following sparse warnings.
drivers/infiniband/hw/cxgb4/qp.c:614:16:
warning: incorrect type in assignment (different base types)
expected unsigned int [unsigned] [usertype] r2
got restricted __be32 [usertype] <noident>
drivers/infiniband/hw/cxgb4/qp.c:615:18:
warning: incorrect type in assignment (different base types)
expected unsigned int [unsigned] [usertype] stag
got restricted __be32 [usertype] <noident>
Cc: Steve Wise <swise(a)opengridcomputing.com>
Signed-off-by: Leon Romanovsky <leon(a)kernel.org>
Reviewed-by: Steve Wise <swise(a)opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford(a)redhat.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/infiniband/hw/cxgb4/t4fw_ri_api.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/infiniband/hw/cxgb4/t4fw_ri_api.h
+++ b/drivers/infiniband/hw/cxgb4/t4fw_ri_api.h
@@ -675,8 +675,8 @@ struct fw_ri_fr_nsmr_tpte_wr {
__u16 wrid;
__u8 r1[3];
__u8 len16;
- __u32 r2;
- __u32 stag;
+ __be32 r2;
+ __be32 stag;
struct fw_ri_tpte tpte;
__u64 pbl[2];
};
Patches currently in stable-queue which might be from leon(a)kernel.org are
queue-4.9/rdma-cxgb4-annotate-r2-and-stag-as-__be32.patch
queue-4.9/ib-mlx5-assign-send-cq-and-recv-cq-of-umr-qp.patch
queue-4.9/ib-mlx4-increase-maximal-message-size-under-ud-qp.patch
This is a note to let you know that I've just added the patch titled
powerpc: Fix compiling a BE kernel with a powerpc64le toolchain
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:
powerpc-fix-compiling-a-be-kernel-with-a-powerpc64le-toolchain.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: Nicholas Piggin <npiggin(a)gmail.com>
Date: Sun, 27 Nov 2016 13:46:20 +1100
Subject: powerpc: Fix compiling a BE kernel with a powerpc64le toolchain
From: Nicholas Piggin <npiggin(a)gmail.com>
[ Upstream commit 4dc831aa88132f835cefe876aa0206977c4d7710 ]
GCC can compile with either endian, but the default ABI version is set
based on the default endianness of the toolchain. Alan Modra says:
you need both -mbig and -mabi=elfv1 to make a powerpc64le gcc
generate powerpc64 code
The opposite is true for powerpc64 when generating -mlittle it
requires -mabi=elfv2 to generate v2 ABI, which we were already doing.
This change adds ABI annotations together with endianness for all cases,
LE and BE. This fixes the case of building a BE kernel with a toolchain
that is LE by default.
Signed-off-by: Nicholas Piggin <npiggin(a)gmail.com>
Tested-by: Naveen N. Rao <naveen.n.rao(a)linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/powerpc/Makefile | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -72,8 +72,15 @@ GNUTARGET := powerpc
MULTIPLEWORD := -mmultiple
endif
-cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
+ifdef CONFIG_PPC64
+cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
+cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mcall-aixdesc)
+aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
+aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
+endif
+
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
+cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
ifneq ($(cc-name),clang)
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
endif
@@ -113,7 +120,9 @@ ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
else
+CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
+AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
endif
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
Patches currently in stable-queue which might be from npiggin(a)gmail.com are
queue-4.9/powerpc-64s-initialize-isav3-mmu-registers-before-setting-partition-table.patch
queue-4.9/powerpc-fix-compiling-a-be-kernel-with-a-powerpc64le-toolchain.patch