]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Mar 2020 11:59:32 +0000 (12:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Mar 2020 11:59:32 +0000 (12:59 +0100)
added patches:
net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch
net-atlantic-fix-potential-error-handling.patch
net-atlantic-fix-use-after-free-kasan-warn.patch
net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch
net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch
net-smc-no-peer-id-in-clc-decline-for-smcd.patch
nvme-pci-hold-cq_poll_lock-while-completing-cqes.patch
s390-qeth-vnicc-fix-eopnotsupp-precedence.patch
selftests-install-settings-files-to-fix-timeout-failures.patch

12 files changed:
queue-5.4/net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch [new file with mode: 0644]
queue-5.4/net-atlantic-fix-potential-error-handling.patch [new file with mode: 0644]
queue-5.4/net-atlantic-fix-use-after-free-kasan-warn.patch [new file with mode: 0644]
queue-5.4/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch [new file with mode: 0644]
queue-5.4/net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch [new file with mode: 0644]
queue-5.4/net-phy-restore-mdio-regs-in-the-iproc-mdio-driver.patch
queue-5.4/net-smc-no-peer-id-in-clc-decline-for-smcd.patch [new file with mode: 0644]
queue-5.4/nvme-pci-hold-cq_poll_lock-while-completing-cqes.patch [new file with mode: 0644]
queue-5.4/s390-qeth-vnicc-fix-eopnotsupp-precedence.patch [new file with mode: 0644]
queue-5.4/sched-core-don-t-skip-remote-tick-for-idle-cpus.patch
queue-5.4/selftests-install-settings-files-to-fix-timeout-failures.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch b/queue-5.4/net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch
new file mode 100644 (file)
index 0000000..061d5d1
--- /dev/null
@@ -0,0 +1,34 @@
+From 5a292c89a84d49b598f8978f154bdda48b1072c0 Mon Sep 17 00:00:00 2001
+From: Dmitry Bogdanov <dbogdanov@marvell.com>
+Date: Fri, 14 Feb 2020 18:44:58 +0300
+Subject: net: atlantic: fix out of range usage of active_vlans array
+
+From: Dmitry Bogdanov <dbogdanov@marvell.com>
+
+commit 5a292c89a84d49b598f8978f154bdda48b1072c0 upstream.
+
+fix static checker warning:
+ drivers/net/ethernet/aquantia/atlantic/aq_filters.c:166 aq_check_approve_fvlan()
+ error: passing untrusted data to 'test_bit()'
+
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Fixes: 7975d2aff5af: ("net: aquantia: add support of rx-vlan-filter offload")
+Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/aquantia/atlantic/aq_filters.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/aquantia/atlantic/aq_filters.c
++++ b/drivers/net/ethernet/aquantia/atlantic/aq_filters.c
+@@ -158,7 +158,7 @@ aq_check_approve_fvlan(struct aq_nic_s *
+       }
+       if ((aq_nic->ndev->features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
+-          (!test_bit(be16_to_cpu(fsp->h_ext.vlan_tci),
++          (!test_bit(be16_to_cpu(fsp->h_ext.vlan_tci) & VLAN_VID_MASK,
+                      aq_nic->active_vlans))) {
+               netdev_err(aq_nic->ndev,
+                          "ethtool: unknown vlan-id specified");
diff --git a/queue-5.4/net-atlantic-fix-potential-error-handling.patch b/queue-5.4/net-atlantic-fix-potential-error-handling.patch
new file mode 100644 (file)
index 0000000..85d8ea7
--- /dev/null
@@ -0,0 +1,40 @@
+From 380ec5b9af7f0d57dbf6ac067fd9f33cff2fef71 Mon Sep 17 00:00:00 2001
+From: Pavel Belous <pbelous@marvell.com>
+Date: Fri, 14 Feb 2020 18:44:56 +0300
+Subject: net: atlantic: fix potential error handling
+
+From: Pavel Belous <pbelous@marvell.com>
+
+commit 380ec5b9af7f0d57dbf6ac067fd9f33cff2fef71 upstream.
+
+Code inspection found that in case of mapping error we do return current
+'ret' value. But beside error, it is used to count number of descriptors
+allocated for the packet. In that case map_skb function could return '1'.
+
+Changing it to return zero (number of mapped descriptors for skb)
+
+Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
+Signed-off-by: Pavel Belous <pbelous@marvell.com>
+Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
+Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/aquantia/atlantic/aq_nic.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
++++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+@@ -467,8 +467,10 @@ static unsigned int aq_nic_map_skb(struc
+                                    dx_buff->len,
+                                    DMA_TO_DEVICE);
+-      if (unlikely(dma_mapping_error(aq_nic_get_dev(self), dx_buff->pa)))
++      if (unlikely(dma_mapping_error(aq_nic_get_dev(self), dx_buff->pa))) {
++              ret = 0;
+               goto exit;
++      }
+       first = dx_buff;
+       dx_buff->len_pkt = skb->len;
diff --git a/queue-5.4/net-atlantic-fix-use-after-free-kasan-warn.patch b/queue-5.4/net-atlantic-fix-use-after-free-kasan-warn.patch
new file mode 100644 (file)
index 0000000..6561a1a
--- /dev/null
@@ -0,0 +1,62 @@
+From a4980919ad6a7be548d499bc5338015e1a9191c6 Mon Sep 17 00:00:00 2001
+From: Pavel Belous <pbelous@marvell.com>
+Date: Fri, 14 Feb 2020 18:44:55 +0300
+Subject: net: atlantic: fix use after free kasan warn
+
+From: Pavel Belous <pbelous@marvell.com>
+
+commit a4980919ad6a7be548d499bc5338015e1a9191c6 upstream.
+
+skb->len is used to calculate statistics after xmit invocation.
+
+Under a stress load it may happen that skb will be xmited,
+rx interrupt will come and skb will be freed, all before xmit function
+is even returned.
+
+Eventually, skb->len will access unallocated area.
+
+Moving stats calculation into tx_clean routine.
+
+Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code")
+Reported-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
+Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
+Signed-off-by: Pavel Belous <pbelous@marvell.com>
+Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/aquantia/atlantic/aq_nic.c  |    4 ----
+ drivers/net/ethernet/aquantia/atlantic/aq_ring.c |    7 +++++--
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
++++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+@@ -598,10 +598,6 @@ int aq_nic_xmit(struct aq_nic_s *self, s
+       if (likely(frags)) {
+               err = self->aq_hw_ops->hw_ring_tx_xmit(self->aq_hw,
+                                                      ring, frags);
+-              if (err >= 0) {
+-                      ++ring->stats.tx.packets;
+-                      ring->stats.tx.bytes += skb->len;
+-              }
+       } else {
+               err = NETDEV_TX_BUSY;
+       }
+--- a/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
++++ b/drivers/net/ethernet/aquantia/atlantic/aq_ring.c
+@@ -243,9 +243,12 @@ bool aq_ring_tx_clean(struct aq_ring_s *
+                       }
+               }
+-              if (unlikely(buff->is_eop))
+-                      dev_kfree_skb_any(buff->skb);
++              if (unlikely(buff->is_eop)) {
++                      ++self->stats.rx.packets;
++                      self->stats.tx.bytes += buff->skb->len;
++                      dev_kfree_skb_any(buff->skb);
++              }
+               buff->pa = 0U;
+               buff->eop_index = 0xffffU;
+               self->sw_head = aq_ring_next_dx(self, self->sw_head);
diff --git a/queue-5.4/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch b/queue-5.4/net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch
new file mode 100644 (file)
index 0000000..a16c295
--- /dev/null
@@ -0,0 +1,72 @@
+From 470793a78ce344bd53d31e0c2d537f71ba957547 Mon Sep 17 00:00:00 2001
+From: Arthur Kiyanovski <akiyano@amazon.com>
+Date: Tue, 11 Feb 2020 15:17:49 +0000
+Subject: net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE
+
+From: Arthur Kiyanovski <akiyano@amazon.com>
+
+commit 470793a78ce344bd53d31e0c2d537f71ba957547 upstream.
+
+As the name suggests ETH_RSS_HASH_NO_CHANGE is received upon changing
+the key or indirection table using ethtool while keeping the same hash
+function.
+
+Also add a function for retrieving the current hash function from
+the ena-com layer.
+
+Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
+Signed-off-by: Sameeh Jubran <sameehj@amazon.com>
+Signed-off-by: Saeed Bshara <saeedb@amazon.com>
+Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/amazon/ena/ena_com.c     |    5 +++++
+ drivers/net/ethernet/amazon/ena/ena_com.h     |    8 ++++++++
+ drivers/net/ethernet/amazon/ena/ena_ethtool.c |    3 +++
+ 3 files changed, 16 insertions(+)
+
+--- a/drivers/net/ethernet/amazon/ena/ena_com.c
++++ b/drivers/net/ethernet/amazon/ena/ena_com.c
+@@ -1059,6 +1059,11 @@ static void ena_com_hash_key_fill_defaul
+       hash_key->keys_num = sizeof(hash_key->key) / sizeof(u32);
+ }
++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev)
++{
++      return ena_dev->rss.hash_func;
++}
++
+ static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev)
+ {
+       struct ena_rss *rss = &ena_dev->rss;
+--- a/drivers/net/ethernet/amazon/ena/ena_com.h
++++ b/drivers/net/ethernet/amazon/ena/ena_com.h
+@@ -656,6 +656,14 @@ int ena_com_rss_init(struct ena_com_dev
+  */
+ void ena_com_rss_destroy(struct ena_com_dev *ena_dev);
++/* ena_com_get_current_hash_function - Get RSS hash function
++ * @ena_dev: ENA communication layer struct
++ *
++ * Return the current hash function.
++ * @return: 0 or one of the ena_admin_hash_functions values.
++ */
++int ena_com_get_current_hash_function(struct ena_com_dev *ena_dev);
++
+ /* ena_com_fill_hash_function - Fill RSS hash function
+  * @ena_dev: ENA communication layer struct
+  * @func: The hash function (Toeplitz or crc)
+--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
++++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+@@ -736,6 +736,9 @@ static int ena_set_rxfh(struct net_devic
+       }
+       switch (hfunc) {
++      case ETH_RSS_HASH_NO_CHANGE:
++              func = ena_com_get_current_hash_function(ena_dev);
++              break;
+       case ETH_RSS_HASH_TOP:
+               func = ENA_ADMIN_TOEPLITZ;
+               break;
diff --git a/queue-5.4/net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch b/queue-5.4/net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch
new file mode 100644 (file)
index 0000000..a56ae4c
--- /dev/null
@@ -0,0 +1,53 @@
+From 3a20773beeeeadec41477a5ba872175b778ff752 Mon Sep 17 00:00:00 2001
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Date: Thu, 20 Feb 2020 16:42:13 +0200
+Subject: net: netlink: cap max groups which will be considered in netlink_bind()
+
+From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+
+commit 3a20773beeeeadec41477a5ba872175b778ff752 upstream.
+
+Since nl_groups is a u32 we can't bind more groups via ->bind
+(netlink_bind) call, but netlink has supported more groups via
+setsockopt() for a long time and thus nlk->ngroups could be over 32.
+Recently I added support for per-vlan notifications and increased the
+groups to 33 for NETLINK_ROUTE which exposed an old bug in the
+netlink_bind() code causing out-of-bounds access on archs where unsigned
+long is 32 bits via test_bit() on a local variable. Fix this by capping the
+maximum groups in netlink_bind() to BITS_PER_TYPE(u32), effectively
+capping them at 32 which is the minimum of allocated groups and the
+maximum groups which can be bound via netlink_bind().
+
+CC: Christophe Leroy <christophe.leroy@c-s.fr>
+CC: Richard Guy Briggs <rgb@redhat.com>
+Fixes: 4f520900522f ("netlink: have netlink per-protocol bind function return an error code.")
+Reported-by: Erhard F. <erhard_f@mailbox.org>
+Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/netlink/af_netlink.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/net/netlink/af_netlink.c
++++ b/net/netlink/af_netlink.c
+@@ -1014,7 +1014,8 @@ static int netlink_bind(struct socket *s
+       if (nlk->netlink_bind && groups) {
+               int group;
+-              for (group = 0; group < nlk->ngroups; group++) {
++              /* nl_groups is a u32, so cap the maximum groups we can bind */
++              for (group = 0; group < BITS_PER_TYPE(u32); group++) {
+                       if (!test_bit(group, &groups))
+                               continue;
+                       err = nlk->netlink_bind(net, group + 1);
+@@ -1033,7 +1034,7 @@ static int netlink_bind(struct socket *s
+                       netlink_insert(sk, nladdr->nl_pid) :
+                       netlink_autobind(sock);
+               if (err) {
+-                      netlink_undo_bind(nlk->ngroups, groups, sk);
++                      netlink_undo_bind(BITS_PER_TYPE(u32), groups, sk);
+                       goto unlock;
+               }
+       }
index 25b690e5568daf166db6ddd2d6aaaa6cd1bf021e..47d542a43e3d02fc6cd662415132f8772ffdc310 100644 (file)
@@ -5,6 +5,8 @@ Subject: net: phy: restore mdio regs in the iproc mdio driver
 
 From: Arun Parameswaran <arun.parameswaran@broadcom.com>
 
+commit 6f08e98d62799e53c89dbf2c9a49d77e20ca648c upstream.
+
 The mii management register in iproc mdio block
 does not have a retention register so it is lost on suspend.
 Save and restore value of register while resuming from suspend.
diff --git a/queue-5.4/net-smc-no-peer-id-in-clc-decline-for-smcd.patch b/queue-5.4/net-smc-no-peer-id-in-clc-decline-for-smcd.patch
new file mode 100644 (file)
index 0000000..6f8a31c
--- /dev/null
@@ -0,0 +1,35 @@
+From 369537c97024dca99303a8d4d6ab38b4f54d3909 Mon Sep 17 00:00:00 2001
+From: Ursula Braun <ubraun@linux.ibm.com>
+Date: Fri, 14 Feb 2020 08:59:00 +0100
+Subject: net/smc: no peer ID in CLC decline for SMCD
+
+From: Ursula Braun <ubraun@linux.ibm.com>
+
+commit 369537c97024dca99303a8d4d6ab38b4f54d3909 upstream.
+
+Just SMCR requires a CLC Peer ID, but not SMCD. The field should be
+zero for SMCD.
+
+Fixes: c758dfddc1b5 ("net/smc: add SMC-D support in CLC messages")
+Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
+Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/smc/smc_clc.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/smc/smc_clc.c
++++ b/net/smc/smc_clc.c
+@@ -372,7 +372,9 @@ int smc_clc_send_decline(struct smc_sock
+       dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline));
+       dclc.hdr.version = SMC_CLC_V1;
+       dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0;
+-      memcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid));
++      if (smc->conn.lgr && !smc->conn.lgr->is_smcd)
++              memcpy(dclc.id_for_peer, local_systemid,
++                     sizeof(local_systemid));
+       dclc.peer_diagnosis = htonl(peer_diag_info);
+       memcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER));
diff --git a/queue-5.4/nvme-pci-hold-cq_poll_lock-while-completing-cqes.patch b/queue-5.4/nvme-pci-hold-cq_poll_lock-while-completing-cqes.patch
new file mode 100644 (file)
index 0000000..399212b
--- /dev/null
@@ -0,0 +1,38 @@
+From 9515743bfb39c61aaf3d4f3219a645c8d1fe9a0e Mon Sep 17 00:00:00 2001
+From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
+Date: Wed, 26 Feb 2020 18:53:43 -0800
+Subject: nvme-pci: Hold cq_poll_lock while completing CQEs
+
+From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
+
+commit 9515743bfb39c61aaf3d4f3219a645c8d1fe9a0e upstream.
+
+Completions need to consumed in the same order the controller submitted
+them, otherwise future completion entries may overwrite ones we haven't
+handled yet. Hold the nvme queue's poll lock while completing new CQEs to
+prevent another thread from freeing command tags for reuse out-of-order.
+
+Fixes: dabcefab45d3 ("nvme: provide optimized poll function for separate poll queues")
+Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/nvme/host/pci.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -1084,9 +1084,9 @@ static int nvme_poll(struct blk_mq_hw_ct
+       spin_lock(&nvmeq->cq_poll_lock);
+       found = nvme_process_cq(nvmeq, &start, &end, -1);
++      nvme_complete_cqes(nvmeq, start, end);
+       spin_unlock(&nvmeq->cq_poll_lock);
+-      nvme_complete_cqes(nvmeq, start, end);
+       return found;
+ }
diff --git a/queue-5.4/s390-qeth-vnicc-fix-eopnotsupp-precedence.patch b/queue-5.4/s390-qeth-vnicc-fix-eopnotsupp-precedence.patch
new file mode 100644 (file)
index 0000000..a1f16a3
--- /dev/null
@@ -0,0 +1,106 @@
+From 6f3846f0955308b6d1b219419da42b8de2c08845 Mon Sep 17 00:00:00 2001
+From: Alexandra Winter <wintera@linux.ibm.com>
+Date: Thu, 20 Feb 2020 15:54:54 +0100
+Subject: s390/qeth: vnicc Fix EOPNOTSUPP precedence
+
+From: Alexandra Winter <wintera@linux.ibm.com>
+
+commit 6f3846f0955308b6d1b219419da42b8de2c08845 upstream.
+
+When getting or setting VNICC parameters, the error code EOPNOTSUPP
+should have precedence over EBUSY.
+
+EBUSY is used because vnicc feature and bridgeport feature are mutually
+exclusive, which is a temporary condition.
+Whereas EOPNOTSUPP indicates that the HW does not support all or parts of
+the vnicc feature.
+This issue causes the vnicc sysfs params to show 'blocked by bridgeport'
+for HW that does not support VNICC at all.
+
+Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support")
+Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
+Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/s390/net/qeth_l2_main.c |   29 +++++++++++++----------------
+ 1 file changed, 13 insertions(+), 16 deletions(-)
+
+--- a/drivers/s390/net/qeth_l2_main.c
++++ b/drivers/s390/net/qeth_l2_main.c
+@@ -1846,15 +1846,14 @@ int qeth_l2_vnicc_set_state(struct qeth_
+       QETH_CARD_TEXT(card, 2, "vniccsch");
+-      /* do not change anything if BridgePort is enabled */
+-      if (qeth_bridgeport_is_in_use(card))
+-              return -EBUSY;
+-
+       /* check if characteristic and enable/disable are supported */
+       if (!(card->options.vnicc.sup_chars & vnicc) ||
+           !(card->options.vnicc.set_char_sup & vnicc))
+               return -EOPNOTSUPP;
++      if (qeth_bridgeport_is_in_use(card))
++              return -EBUSY;
++
+       /* set enable/disable command and store wanted characteristic */
+       if (state) {
+               cmd = IPA_VNICC_ENABLE;
+@@ -1900,14 +1899,13 @@ int qeth_l2_vnicc_get_state(struct qeth_
+       QETH_CARD_TEXT(card, 2, "vniccgch");
+-      /* do not get anything if BridgePort is enabled */
+-      if (qeth_bridgeport_is_in_use(card))
+-              return -EBUSY;
+-
+       /* check if characteristic is supported */
+       if (!(card->options.vnicc.sup_chars & vnicc))
+               return -EOPNOTSUPP;
++      if (qeth_bridgeport_is_in_use(card))
++              return -EBUSY;
++
+       /* if card is ready, query current VNICC state */
+       if (qeth_card_hw_is_reachable(card))
+               rc = qeth_l2_vnicc_query_chars(card);
+@@ -1925,15 +1923,14 @@ int qeth_l2_vnicc_set_timeout(struct qet
+       QETH_CARD_TEXT(card, 2, "vniccsto");
+-      /* do not change anything if BridgePort is enabled */
+-      if (qeth_bridgeport_is_in_use(card))
+-              return -EBUSY;
+-
+       /* check if characteristic and set_timeout are supported */
+       if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
+           !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
+               return -EOPNOTSUPP;
++      if (qeth_bridgeport_is_in_use(card))
++              return -EBUSY;
++
+       /* do we need to do anything? */
+       if (card->options.vnicc.learning_timeout == timeout)
+               return rc;
+@@ -1962,14 +1959,14 @@ int qeth_l2_vnicc_get_timeout(struct qet
+       QETH_CARD_TEXT(card, 2, "vniccgto");
+-      /* do not get anything if BridgePort is enabled */
+-      if (qeth_bridgeport_is_in_use(card))
+-              return -EBUSY;
+-
+       /* check if characteristic and get_timeout are supported */
+       if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
+           !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
+               return -EOPNOTSUPP;
++
++      if (qeth_bridgeport_is_in_use(card))
++              return -EBUSY;
++
+       /* if card is ready, get timeout. Otherwise, just return stored value */
+       *timeout = card->options.vnicc.learning_timeout;
+       if (qeth_card_hw_is_reachable(card))
index 4ebd35e8a7b96c81ecebc39544d8f33852afda71..70d8c20606d8916c624d1c6cd579355c76f2dd4c 100644 (file)
@@ -17,14 +17,12 @@ Signed-off-by: Ingo Molnar <mingo@kernel.org>
 Link: https://lkml.kernel.org/r/1578736419-14628-2-git-send-email-swood@redhat.com
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- kernel/sched/core.c | 18 ++++++++++--------
+ kernel/sched/core.c |   18 ++++++++++--------
  1 file changed, 10 insertions(+), 8 deletions(-)
 
-diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index e6c65725b7ce0..067ac465a4b25 100644
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3668,22 +3668,24 @@ static void sched_tick_remote(struct work_struct *work)
+@@ -3668,22 +3668,24 @@ static void sched_tick_remote(struct wor
         * statistics and checks timeslices in a time-independent way, regardless
         * of when exactly it is running.
         */
@@ -57,6 +55,3 @@ index e6c65725b7ce0..067ac465a4b25 100644
        curr->sched_class->task_tick(rq, curr, 0);
  
  out_unlock:
--- 
-2.20.1
-
diff --git a/queue-5.4/selftests-install-settings-files-to-fix-timeout-failures.patch b/queue-5.4/selftests-install-settings-files-to-fix-timeout-failures.patch
new file mode 100644 (file)
index 0000000..99075a7
--- /dev/null
@@ -0,0 +1,79 @@
+From b9167c8078c3527de6da241c8a1a75a9224ed90a Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Thu, 20 Feb 2020 15:42:41 +1100
+Subject: selftests: Install settings files to fix TIMEOUT failures
+
+From: Michael Ellerman <mpe@ellerman.id.au>
+
+commit b9167c8078c3527de6da241c8a1a75a9224ed90a upstream.
+
+Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second
+timeout per test") added a 45 second timeout for tests, and also added
+a way for tests to customise the timeout via a settings file.
+
+For example the ftrace tests take multiple minutes to run, so they
+were given longer in commit b43e78f65b1d ("tracing/selftests: Turn off
+timeout setting").
+
+This works when the tests are run from the source tree. However if the
+tests are installed with "make -C tools/testing/selftests install",
+the settings files are not copied into the install directory. When the
+tests are then run from the install directory the longer timeouts are
+not applied and the tests timeout incorrectly.
+
+So add the settings files to TEST_FILES of the appropriate Makefiles
+to cause the settings files to be installed using the existing install
+logic.
+
+Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test")
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/testing/selftests/ftrace/Makefile    |    2 +-
+ tools/testing/selftests/livepatch/Makefile |    2 ++
+ tools/testing/selftests/rseq/Makefile      |    2 ++
+ tools/testing/selftests/rtc/Makefile       |    2 ++
+ 4 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/tools/testing/selftests/ftrace/Makefile
++++ b/tools/testing/selftests/ftrace/Makefile
+@@ -2,7 +2,7 @@
+ all:
+ TEST_PROGS := ftracetest
+-TEST_FILES := test.d
++TEST_FILES := test.d settings
+ EXTRA_CLEAN := $(OUTPUT)/logs/*
+ include ../lib.mk
+--- a/tools/testing/selftests/livepatch/Makefile
++++ b/tools/testing/selftests/livepatch/Makefile
+@@ -6,4 +6,6 @@ TEST_PROGS := \
+       test-callbacks.sh \
+       test-shadow-vars.sh
++TEST_FILES := settings
++
+ include ../lib.mk
+--- a/tools/testing/selftests/rseq/Makefile
++++ b/tools/testing/selftests/rseq/Makefile
+@@ -19,6 +19,8 @@ TEST_GEN_PROGS_EXTENDED = librseq.so
+ TEST_PROGS = run_param_test.sh
++TEST_FILES := settings
++
+ include ../lib.mk
+ $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h
+--- a/tools/testing/selftests/rtc/Makefile
++++ b/tools/testing/selftests/rtc/Makefile
+@@ -6,4 +6,6 @@ TEST_GEN_PROGS = rtctest
+ TEST_GEN_PROGS_EXTENDED = setdate
++TEST_FILES := settings
++
+ include ../lib.mk
index 9b072411b2bafe3193a6ea91d9592055fdc457cb..e5ca97b8fabf297dc6e753615cdcc7c54a2a8ab2 100644 (file)
@@ -101,3 +101,12 @@ mac80211-remove-a-redundant-mutex-unlock.patch
 kbuild-fix-dt-binding-schema-rule-to-detect-command-line-changes.patch
 hv_netvsc-fix-unwanted-wakeup-in-netvsc_attach.patch
 usb-charger-assign-specific-number-for-enum-value.patch
+nvme-pci-hold-cq_poll_lock-while-completing-cqes.patch
+s390-qeth-vnicc-fix-eopnotsupp-precedence.patch
+net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch
+net-atlantic-fix-use-after-free-kasan-warn.patch
+net-atlantic-fix-potential-error-handling.patch
+net-atlantic-fix-out-of-range-usage-of-active_vlans-array.patch
+net-smc-no-peer-id-in-clc-decline-for-smcd.patch
+net-ena-make-ena-rxfh-support-eth_rss_hash_no_change.patch
+selftests-install-settings-files-to-fix-timeout-failures.patch