]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2020 13:04:47 +0000 (14:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2020 13:04:47 +0000 (14:04 +0100)
added patches:
bpf-selftests-build-error-in-sockmap_basic.c.patch
net-mlx5-fix-sleep-while-atomic-in-mlx5_eswitch_get_vepa.patch
net-mlx5e-fix-crash-in-recovery-flow-without-devlink-reporter.patch
net-mlx5e-reset-rq-doorbell-counter-before-moving-rq-state-from-rst-to-rdy.patch
s390-kaslr-fix-casts-in-get_random.patch
s390-mm-explicitly-compare-page_default_key-against-zero-in-storage_key_init_range.patch
xen-enable-interrupts-when-calling-_cond_resched.patch

queue-5.4/bpf-selftests-build-error-in-sockmap_basic.c.patch [new file with mode: 0644]
queue-5.4/net-mlx5-fix-sleep-while-atomic-in-mlx5_eswitch_get_vepa.patch [new file with mode: 0644]
queue-5.4/net-mlx5e-fix-crash-in-recovery-flow-without-devlink-reporter.patch [new file with mode: 0644]
queue-5.4/net-mlx5e-reset-rq-doorbell-counter-before-moving-rq-state-from-rst-to-rdy.patch [new file with mode: 0644]
queue-5.4/s390-kaslr-fix-casts-in-get_random.patch [new file with mode: 0644]
queue-5.4/s390-mm-explicitly-compare-page_default_key-against-zero-in-storage_key_init_range.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/xen-enable-interrupts-when-calling-_cond_resched.patch [new file with mode: 0644]

diff --git a/queue-5.4/bpf-selftests-build-error-in-sockmap_basic.c.patch b/queue-5.4/bpf-selftests-build-error-in-sockmap_basic.c.patch
new file mode 100644 (file)
index 0000000..d08623b
--- /dev/null
@@ -0,0 +1,57 @@
+From f2e97dc126b712c0d21219ed0c42710006c1cf52 Mon Sep 17 00:00:00 2001
+From: John Fastabend <john.fastabend@gmail.com>
+Date: Sun, 9 Feb 2020 21:44:37 -0800
+Subject: bpf: Selftests build error in sockmap_basic.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: John Fastabend <john.fastabend@gmail.com>
+
+commit f2e97dc126b712c0d21219ed0c42710006c1cf52 upstream.
+
+Fix following build error. We could push a tcp.h header into one of the
+include paths, but I think its easy enough to simply pull in the three
+defines we need here. If we end up using more of tcp.h at some point
+we can pull it in later.
+
+/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c: In function ‘connected_socket_v4’:
+/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function)
+  repair = TCP_REPAIR_ON;
+           ^
+/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: note: each undeclared identifier is reported only once for each function it appears in
+/home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:29:11: error: ‘TCP_REPAIR_OFF_NO_WP’ undeclared (first use in this function)
+  repair = TCP_REPAIR_OFF_NO_WP;
+
+Then with fix,
+
+$ ./test_progs -n 44
+#44/1 sockmap create_update_free:OK
+#44/2 sockhash create_update_free:OK
+#44 sockmap_basic:OK
+
+Fixes: 5d3919a953c3c ("selftests/bpf: Test freeing sockmap/sockhash with a socket in it")
+Signed-off-by: John Fastabend <john.fastabend@gmail.com>
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
+Link: https://lore.kernel.org/bpf/158131347731.21414.12120493483848386652.stgit@john-Precision-5820-Tower
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/testing/selftests/bpf/prog_tests/sockmap_basic.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
++++ b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
+@@ -3,6 +3,11 @@
+ #include "test_progs.h"
++#define TCP_REPAIR            19      /* TCP sock is under repair right now */
++
++#define TCP_REPAIR_ON         1
++#define TCP_REPAIR_OFF_NO_WP  -1      /* Turn off without window probes */
++
+ static int connected_socket_v4(void)
+ {
+       struct sockaddr_in addr = {
diff --git a/queue-5.4/net-mlx5-fix-sleep-while-atomic-in-mlx5_eswitch_get_vepa.patch b/queue-5.4/net-mlx5-fix-sleep-while-atomic-in-mlx5_eswitch_get_vepa.patch
new file mode 100644 (file)
index 0000000..648ad22
--- /dev/null
@@ -0,0 +1,61 @@
+From 3d9c5e023a0dbf3e117bb416cfefd9405bf5af0c Mon Sep 17 00:00:00 2001
+From: Huy Nguyen <huyn@mellanox.com>
+Date: Mon, 3 Feb 2020 16:32:18 -0600
+Subject: net/mlx5: Fix sleep while atomic in mlx5_eswitch_get_vepa
+
+From: Huy Nguyen <huyn@mellanox.com>
+
+commit 3d9c5e023a0dbf3e117bb416cfefd9405bf5af0c upstream.
+
+rtnl_bridge_getlink is protected by rcu lock, so mlx5_eswitch_get_vepa
+cannot take mutex lock. Two possible issues can happen:
+1. User at the same time change vepa mode via RTM_SETLINK command.
+2. User at the same time change the switchdev mode via devlink netlink
+interface.
+
+Case 1 cannot happen because rtnl executes one message in order.
+Case 2 can happen but we do not expect user to change the switchdev mode
+when changing vepa. Even if a user does it, so he will read a value
+which is no longer valid.
+
+Fixes: 8da202b24913 ("net/mlx5: E-Switch, Add support for VEPA in legacy mode.")
+Signed-off-by: Huy Nguyen <huyn@mellanox.com>
+Reviewed-by: Mark Bloch <markb@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/mellanox/mlx5/core/eswitch.c |   14 +++-----------
+ 1 file changed, 3 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+@@ -2319,25 +2319,17 @@ out:
+ int mlx5_eswitch_get_vepa(struct mlx5_eswitch *esw, u8 *setting)
+ {
+-      int err = 0;
+-
+       if (!esw)
+               return -EOPNOTSUPP;
+       if (!ESW_ALLOWED(esw))
+               return -EPERM;
+-      mutex_lock(&esw->state_lock);
+-      if (esw->mode != MLX5_ESWITCH_LEGACY) {
+-              err = -EOPNOTSUPP;
+-              goto out;
+-      }
++      if (esw->mode != MLX5_ESWITCH_LEGACY)
++              return -EOPNOTSUPP;
+       *setting = esw->fdb_table.legacy.vepa_uplink_rule ? 1 : 0;
+-
+-out:
+-      mutex_unlock(&esw->state_lock);
+-      return err;
++      return 0;
+ }
+ int mlx5_eswitch_set_vport_trust(struct mlx5_eswitch *esw,
diff --git a/queue-5.4/net-mlx5e-fix-crash-in-recovery-flow-without-devlink-reporter.patch b/queue-5.4/net-mlx5e-fix-crash-in-recovery-flow-without-devlink-reporter.patch
new file mode 100644 (file)
index 0000000..5d50aa8
--- /dev/null
@@ -0,0 +1,51 @@
+From 1ad6c43c6a7b8627240c6cc19c69e31fedc596a7 Mon Sep 17 00:00:00 2001
+From: Aya Levin <ayal@mellanox.com>
+Date: Wed, 12 Feb 2020 15:17:25 +0200
+Subject: net/mlx5e: Fix crash in recovery flow without devlink reporter
+
+From: Aya Levin <ayal@mellanox.com>
+
+commit 1ad6c43c6a7b8627240c6cc19c69e31fedc596a7 upstream.
+
+When health reporters are not supported, recovery function is invoked
+directly, not via devlink health reporters.
+
+In this direct flow, the recover function input parameter was passed
+incorrectly and is causing a kernel oops. This patch is fixing the input
+parameter.
+
+Following call trace is observed on rx error health reporting.
+
+Internal error: Oops: 96000007 [#1] PREEMPT SMP
+Process kworker/u16:4 (pid: 4584, stack limit = 0x00000000c9e45703)
+Call trace:
+mlx5e_rx_reporter_err_rq_cqe_recover+0x30/0x164 [mlx5_core]
+mlx5e_health_report+0x60/0x6c [mlx5_core]
+mlx5e_reporter_rq_cqe_err+0x6c/0x90 [mlx5_core]
+mlx5e_rq_err_cqe_work+0x20/0x2c [mlx5_core]
+process_one_work+0x168/0x3d0
+worker_thread+0x58/0x3d0
+kthread+0x108/0x134
+
+Fixes: c50de4af1d63 ("net/mlx5e: Generalize tx reporter's functionality")
+Signed-off-by: Aya Levin <ayal@mellanox.com>
+Signed-off-by: Parav Pandit <parav@mellanox.com>
+Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/health.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
+@@ -200,7 +200,7 @@ int mlx5e_health_report(struct mlx5e_pri
+       netdev_err(priv->netdev, err_str);
+       if (!reporter)
+-              return err_ctx->recover(&err_ctx->ctx);
++              return err_ctx->recover(err_ctx->ctx);
+       return devlink_health_report(reporter, err_str, err_ctx);
+ }
diff --git a/queue-5.4/net-mlx5e-reset-rq-doorbell-counter-before-moving-rq-state-from-rst-to-rdy.patch b/queue-5.4/net-mlx5e-reset-rq-doorbell-counter-before-moving-rq-state-from-rst-to-rdy.patch
new file mode 100644 (file)
index 0000000..54cba32
--- /dev/null
@@ -0,0 +1,148 @@
+From 5ee090ed0da649b1febae2b7c285ac77d1e55a0c Mon Sep 17 00:00:00 2001
+From: Aya Levin <ayal@mellanox.com>
+Date: Mon, 9 Dec 2019 14:08:18 +0200
+Subject: net/mlx5e: Reset RQ doorbell counter before moving RQ state from RST to RDY
+
+From: Aya Levin <ayal@mellanox.com>
+
+commit 5ee090ed0da649b1febae2b7c285ac77d1e55a0c upstream.
+
+Initialize RQ doorbell counters to zero prior to moving an RQ from RST
+to RDY state. Per HW spec, when RQ is back to RDY state, the descriptor
+ID on the completion is reset. The doorbell record must comply.
+
+Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ")
+Signed-off-by: Aya Levin <ayal@mellanox.com>
+Reported-by: Tariq Toukan <tariqt@mellanox.com>
+Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h |    8 ++++
+ drivers/net/ethernet/mellanox/mlx5/core/en_main.c |    3 +
+ drivers/net/ethernet/mellanox/mlx5/core/wq.c      |   39 ++++++++++++++++------
+ drivers/net/ethernet/mellanox/mlx5/core/wq.h      |    2 +
+ 4 files changed, 43 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
+@@ -179,6 +179,14 @@ mlx5e_tx_dma_unmap(struct device *pdev,
+       }
+ }
++static inline void mlx5e_rqwq_reset(struct mlx5e_rq *rq)
++{
++      if (rq->wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ)
++              mlx5_wq_ll_reset(&rq->mpwqe.wq);
++      else
++              mlx5_wq_cyc_reset(&rq->wqe.wq);
++}
++
+ /* SW parser related functions */
+ struct mlx5e_swp_spec {
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+@@ -723,6 +723,9 @@ int mlx5e_modify_rq_state(struct mlx5e_r
+       if (!in)
+               return -ENOMEM;
++      if (curr_state == MLX5_RQC_STATE_RST && next_state == MLX5_RQC_STATE_RDY)
++              mlx5e_rqwq_reset(rq);
++
+       rqc = MLX5_ADDR_OF(modify_rq_in, in, ctx);
+       MLX5_SET(modify_rq_in, in, rq_state, curr_state);
+--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.c
+@@ -96,6 +96,13 @@ err_db_free:
+       return err;
+ }
++void mlx5_wq_cyc_reset(struct mlx5_wq_cyc *wq)
++{
++      wq->wqe_ctr = 0;
++      wq->cur_sz = 0;
++      mlx5_wq_cyc_update_db_record(wq);
++}
++
+ int mlx5_wq_qp_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
+                     void *qpc, struct mlx5_wq_qp *wq,
+                     struct mlx5_wq_ctrl *wq_ctrl)
+@@ -194,6 +201,19 @@ err_db_free:
+       return err;
+ }
++static void mlx5_wq_ll_init_list(struct mlx5_wq_ll *wq)
++{
++      struct mlx5_wqe_srq_next_seg *next_seg;
++      int i;
++
++      for (i = 0; i < wq->fbc.sz_m1; i++) {
++              next_seg = mlx5_wq_ll_get_wqe(wq, i);
++              next_seg->next_wqe_index = cpu_to_be16(i + 1);
++      }
++      next_seg = mlx5_wq_ll_get_wqe(wq, i);
++      wq->tail_next = &next_seg->next_wqe_index;
++}
++
+ int mlx5_wq_ll_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
+                     void *wqc, struct mlx5_wq_ll *wq,
+                     struct mlx5_wq_ctrl *wq_ctrl)
+@@ -201,9 +221,7 @@ int mlx5_wq_ll_create(struct mlx5_core_d
+       u8 log_wq_stride = MLX5_GET(wq, wqc, log_wq_stride);
+       u8 log_wq_sz     = MLX5_GET(wq, wqc, log_wq_sz);
+       struct mlx5_frag_buf_ctrl *fbc = &wq->fbc;
+-      struct mlx5_wqe_srq_next_seg *next_seg;
+       int err;
+-      int i;
+       err = mlx5_db_alloc_node(mdev, &wq_ctrl->db, param->db_numa_node);
+       if (err) {
+@@ -222,13 +240,7 @@ int mlx5_wq_ll_create(struct mlx5_core_d
+       mlx5_init_fbc(wq_ctrl->buf.frags, log_wq_stride, log_wq_sz, fbc);
+-      for (i = 0; i < fbc->sz_m1; i++) {
+-              next_seg = mlx5_wq_ll_get_wqe(wq, i);
+-              next_seg->next_wqe_index = cpu_to_be16(i + 1);
+-      }
+-      next_seg = mlx5_wq_ll_get_wqe(wq, i);
+-      wq->tail_next = &next_seg->next_wqe_index;
+-
++      mlx5_wq_ll_init_list(wq);
+       wq_ctrl->mdev = mdev;
+       return 0;
+@@ -239,6 +251,15 @@ err_db_free:
+       return err;
+ }
++void mlx5_wq_ll_reset(struct mlx5_wq_ll *wq)
++{
++      wq->head = 0;
++      wq->wqe_ctr = 0;
++      wq->cur_sz = 0;
++      mlx5_wq_ll_init_list(wq);
++      mlx5_wq_ll_update_db_record(wq);
++}
++
+ void mlx5_wq_destroy(struct mlx5_wq_ctrl *wq_ctrl)
+ {
+       mlx5_frag_buf_free(wq_ctrl->mdev, &wq_ctrl->buf);
+--- a/drivers/net/ethernet/mellanox/mlx5/core/wq.h
++++ b/drivers/net/ethernet/mellanox/mlx5/core/wq.h
+@@ -80,10 +80,12 @@ int mlx5_wq_cyc_create(struct mlx5_core_
+                      void *wqc, struct mlx5_wq_cyc *wq,
+                      struct mlx5_wq_ctrl *wq_ctrl);
+ u32 mlx5_wq_cyc_get_size(struct mlx5_wq_cyc *wq);
++void mlx5_wq_cyc_reset(struct mlx5_wq_cyc *wq);
+ int mlx5_wq_qp_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
+                     void *qpc, struct mlx5_wq_qp *wq,
+                     struct mlx5_wq_ctrl *wq_ctrl);
++void mlx5_wq_ll_reset(struct mlx5_wq_ll *wq);
+ int mlx5_cqwq_create(struct mlx5_core_dev *mdev, struct mlx5_wq_param *param,
+                    void *cqc, struct mlx5_cqwq *wq,
diff --git a/queue-5.4/s390-kaslr-fix-casts-in-get_random.patch b/queue-5.4/s390-kaslr-fix-casts-in-get_random.patch
new file mode 100644 (file)
index 0000000..b348b54
--- /dev/null
@@ -0,0 +1,47 @@
+From 788d671517b5c81efbed9310ccbadb8cca86a08e Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Sat, 8 Feb 2020 07:10:52 -0700
+Subject: s390/kaslr: Fix casts in get_random
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+commit 788d671517b5c81efbed9310ccbadb8cca86a08e upstream.
+
+Clang warns:
+
+../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
+of type 'const u8 *' (aka 'const unsigned char *') converts between
+pointers to integer
+types with different sign [-Wpointer-sign]
+                                  (char *) entropy, (char *) entropy,
+                                                    ^~~~~~~~~~~~~~~~
+../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
+parameter 'src' here
+                            u8 *dest, const u8 *src, long src_len)
+                                                ^
+2 warnings generated.
+
+Fix the cast to match what else is done in this function.
+
+Fixes: b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
+Link: https://github.com/ClangBuiltLinux/linux/issues/862
+Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/boot/kaslr.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/boot/kaslr.c
++++ b/arch/s390/boot/kaslr.c
+@@ -75,7 +75,7 @@ static unsigned long get_random(unsigned
+               *(unsigned long *) prng.parm_block ^= seed;
+               for (i = 0; i < 16; i++) {
+                       cpacf_kmc(CPACF_KMC_PRNG, prng.parm_block,
+-                                (char *) entropy, (char *) entropy,
++                                (u8 *) entropy, (u8 *) entropy,
+                                 sizeof(entropy));
+                       memcpy(prng.parm_block, entropy, sizeof(entropy));
+               }
diff --git a/queue-5.4/s390-mm-explicitly-compare-page_default_key-against-zero-in-storage_key_init_range.patch b/queue-5.4/s390-mm-explicitly-compare-page_default_key-against-zero-in-storage_key_init_range.patch
new file mode 100644 (file)
index 0000000..481c386
--- /dev/null
@@ -0,0 +1,54 @@
+From 380324734956c64cd060e1db4304f3117ac15809 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Thu, 13 Feb 2020 23:42:07 -0700
+Subject: s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+commit 380324734956c64cd060e1db4304f3117ac15809 upstream.
+
+Clang warns:
+
+ In file included from ../arch/s390/purgatory/purgatory.c:10:
+ In file included from ../include/linux/kexec.h:18:
+ In file included from ../include/linux/crash_core.h:6:
+ In file included from ../include/linux/elfcore.h:5:
+ In file included from ../include/linux/user.h:1:
+ In file included from ../arch/s390/include/asm/user.h:11:
+ ../arch/s390/include/asm/page.h:45:6: warning: converting the result of
+ '<<' to a boolean always evaluates to false
+ [-Wtautological-constant-compare]
+         if (PAGE_DEFAULT_KEY)
+            ^
+ ../arch/s390/include/asm/page.h:23:44: note: expanded from macro
+ 'PAGE_DEFAULT_KEY'
+ #define PAGE_DEFAULT_KEY        (PAGE_DEFAULT_ACC << 4)
+                                                  ^
+ 1 warning generated.
+
+Explicitly compare this against zero to silence the warning as it is
+intended to be used in a boolean context.
+
+Fixes: de3fa841e429 ("s390/mm: fix compile for PAGE_DEFAULT_KEY != 0")
+Link: https://github.com/ClangBuiltLinux/linux/issues/860
+Link: https://lkml.kernel.org/r/20200214064207.10381-1-natechancellor@gmail.com
+Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/s390/include/asm/page.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/include/asm/page.h
++++ b/arch/s390/include/asm/page.h
+@@ -42,7 +42,7 @@ void __storage_key_init_range(unsigned l
+ static inline void storage_key_init_range(unsigned long start, unsigned long end)
+ {
+-      if (PAGE_DEFAULT_KEY)
++      if (PAGE_DEFAULT_KEY != 0)
+               __storage_key_init_range(start, end);
+ }
index 31571236614814d5a601dbd9694a991bca03619a..3bbd5ac6656ebc9e7160de5070acb324fa66739b 100644 (file)
@@ -126,3 +126,10 @@ netfilter-xt_hashlimit-limit-the-max-size-of-hashtable.patch
 rxrpc-fix-call-rcu-cleanup-using-non-bh-safe-locks.patch
 io_uring-prevent-sq_thread-from-spinning-when-it-should-stop.patch
 ata-ahci-add-shutdown-to-freeze-hardware-resources-of-ahci.patch
+xen-enable-interrupts-when-calling-_cond_resched.patch
+net-mlx5e-reset-rq-doorbell-counter-before-moving-rq-state-from-rst-to-rdy.patch
+net-mlx5-fix-sleep-while-atomic-in-mlx5_eswitch_get_vepa.patch
+net-mlx5e-fix-crash-in-recovery-flow-without-devlink-reporter.patch
+s390-kaslr-fix-casts-in-get_random.patch
+s390-mm-explicitly-compare-page_default_key-against-zero-in-storage_key_init_range.patch
+bpf-selftests-build-error-in-sockmap_basic.c.patch
diff --git a/queue-5.4/xen-enable-interrupts-when-calling-_cond_resched.patch b/queue-5.4/xen-enable-interrupts-when-calling-_cond_resched.patch
new file mode 100644 (file)
index 0000000..d300a1a
--- /dev/null
@@ -0,0 +1,43 @@
+From 8645e56a4ad6dcbf504872db7f14a2f67db88ef2 Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Wed, 19 Feb 2020 18:30:26 +0100
+Subject: xen: Enable interrupts when calling _cond_resched()
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+commit 8645e56a4ad6dcbf504872db7f14a2f67db88ef2 upstream.
+
+xen_maybe_preempt_hcall() is called from the exception entry point
+xen_do_hypervisor_callback with interrupts disabled.
+
+_cond_resched() evades the might_sleep() check in cond_resched() which
+would have caught that and schedule_debug() unfortunately lacks a check
+for irqs_disabled().
+
+Enable interrupts around the call and use cond_resched() to catch future
+issues.
+
+Fixes: fdfd811ddde3 ("x86/xen: allow privcmd hypercalls to be preempted")
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Link: https://lore.kernel.org/r/878skypjrh.fsf@nanos.tec.linutronix.de
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/preempt.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/xen/preempt.c
++++ b/drivers/xen/preempt.c
+@@ -33,7 +33,9 @@ asmlinkage __visible void xen_maybe_pree
+                * cpu.
+                */
+               __this_cpu_write(xen_in_preemptible_hcall, false);
+-              _cond_resched();
++              local_irq_enable();
++              cond_resched();
++              local_irq_disable();
+               __this_cpu_write(xen_in_preemptible_hcall, true);
+       }
+ }