]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Merge branch 'master' of gitolite.kernel.org:/pub/scm/linux/kernel/git/stable/stable...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2020 01:47:22 +0000 (17:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Feb 2020 01:47:22 +0000 (17:47 -0800)
1  2 
queue-4.14/nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch
queue-4.14/serial-uartps-add-a-timeout-to-the-tx-empty-wait.patch
queue-4.14/series
queue-4.19/series
queue-5.4/series
queue-5.5/series

index 94283ef259df529254a5d42243872f1f24607c85,0000000000000000000000000000000000000000..e992cfe2353d510ee1602dc8b948fd381f839633
mode 100644,000000..100644
--- /dev/null
@@@ -1,118 -1,0 +1,118 @@@
- @@ -1815,6 +1815,7 @@ static void nfs_commit_done(struct rpc_t
 +From 221203ce6406273cf00e5c6397257d986c003ee6 Mon Sep 17 00:00:00 2001
 +From: Trond Myklebust <trondmy@gmail.com>
 +Date: Mon, 6 Jan 2020 15:25:04 -0500
 +Subject: NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes()
 +
 +From: Trond Myklebust <trondmy@gmail.com>
 +
 +commit 221203ce6406273cf00e5c6397257d986c003ee6 upstream.
 +
 +Instead of making assumptions about the commit verifier contents, change
 +the commit code to ensure we always check that the verifier was set
 +by the XDR code.
 +
 +Fixes: f54bcf2ecee9 ("pnfs: Prepare for flexfiles by pulling out common code")
 +Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
 +Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
 +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +
 +---
 + fs/nfs/direct.c   |    4 ++--
 + fs/nfs/nfs3xdr.c  |    5 ++++-
 + fs/nfs/nfs4xdr.c  |    5 ++++-
 + fs/nfs/pnfs_nfs.c |    7 +++----
 + fs/nfs/write.c    |    4 +++-
 + 5 files changed, 16 insertions(+), 9 deletions(-)
 +
 +--- a/fs/nfs/direct.c
 ++++ b/fs/nfs/direct.c
 +@@ -261,10 +261,10 @@ static int nfs_direct_cmp_commit_data_ve
 +                                       data->ds_commit_index);
 + 
 +      /* verifier not set so always fail */
 +-     if (verfp->committed < 0)
 ++     if (verfp->committed < 0 || data->res.verf->committed <= NFS_UNSTABLE)
 +              return 1;
 + 
 +-     return nfs_direct_cmp_verf(verfp, &data->verf);
 ++     return nfs_direct_cmp_verf(verfp, data->res.verf);
 + }
 + 
 + /**
 +--- a/fs/nfs/nfs3xdr.c
 ++++ b/fs/nfs/nfs3xdr.c
 +@@ -2373,6 +2373,7 @@ static int nfs3_xdr_dec_commit3res(struc
 +                                 void *data)
 + {
 +      struct nfs_commitres *result = data;
 ++     struct nfs_writeverf *verf = result->verf;
 +      enum nfs_stat status;
 +      int error;
 + 
 +@@ -2385,7 +2386,9 @@ static int nfs3_xdr_dec_commit3res(struc
 +      result->op_status = status;
 +      if (status != NFS3_OK)
 +              goto out_status;
 +-     error = decode_writeverf3(xdr, &result->verf->verifier);
 ++     error = decode_writeverf3(xdr, &verf->verifier);
 ++     if (!error)
 ++             verf->committed = NFS_FILE_SYNC;
 + out:
 +      return error;
 + out_status:
 +--- a/fs/nfs/nfs4xdr.c
 ++++ b/fs/nfs/nfs4xdr.c
 +@@ -4409,11 +4409,14 @@ static int decode_write_verifier(struct
 + 
 + static int decode_commit(struct xdr_stream *xdr, struct nfs_commitres *res)
 + {
 ++     struct nfs_writeverf *verf = res->verf;
 +      int status;
 + 
 +      status = decode_op_hdr(xdr, OP_COMMIT);
 +      if (!status)
 +-             status = decode_write_verifier(xdr, &res->verf->verifier);
 ++             status = decode_write_verifier(xdr, &verf->verifier);
 ++     if (!status)
 ++             verf->committed = NFS_FILE_SYNC;
 +      return status;
 + }
 + 
 +--- a/fs/nfs/pnfs_nfs.c
 ++++ b/fs/nfs/pnfs_nfs.c
 +@@ -30,12 +30,11 @@ EXPORT_SYMBOL_GPL(pnfs_generic_rw_releas
 + /* Fake up some data that will cause nfs_commit_release to retry the writes. */
 + void pnfs_generic_prepare_to_resend_writes(struct nfs_commit_data *data)
 + {
 +-     struct nfs_page *first = nfs_list_entry(data->pages.next);
 ++     struct nfs_writeverf *verf = data->res.verf;
 + 
 +      data->task.tk_status = 0;
 +-     memcpy(&data->verf.verifier, &first->wb_verf,
 +-            sizeof(data->verf.verifier));
 +-     data->verf.verifier.data[0]++; /* ensure verifier mismatch */
 ++     memset(&verf->verifier, 0, sizeof(verf->verifier));
 ++     verf->committed = NFS_UNSTABLE;
 + }
 + EXPORT_SYMBOL_GPL(pnfs_generic_prepare_to_resend_writes);
 + 
 +--- a/fs/nfs/write.c
 ++++ b/fs/nfs/write.c
- @@ -1841,7 +1842,8 @@ static void nfs_commit_release_pages(str
++@@ -1807,6 +1807,7 @@ static void nfs_commit_done(struct rpc_t
 + 
 + static void nfs_commit_release_pages(struct nfs_commit_data *data)
 + {
 ++     const struct nfs_writeverf *verf = data->res.verf;
 +      struct nfs_page *req;
 +      int status = data->task.tk_status;
 +      struct nfs_commit_info cinfo;
++@@ -1833,7 +1834,8 @@ static void nfs_commit_release_pages(str
 + 
 +              /* Okay, COMMIT succeeded, apparently. Check the verifier
 +               * returned by the server against all stored verfs. */
 +-             if (!nfs_write_verifier_cmp(&req->wb_verf, &data->verf.verifier)) {
 ++             if (verf->committed > NFS_UNSTABLE &&
 ++                 !nfs_write_verifier_cmp(&req->wb_verf, &verf->verifier)) {
 +                      /* We have a match */
 +                      if (req->wb_page)
 +                              nfs_inode_remove_request(req);
index 0000000000000000000000000000000000000000,4c2cdc93a6eac9af942ff1003d55e48e60cc8c53..9d21de234bf7e22da8b1402b10c01fc4894c87b1
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,69 +1,64 @@@
 - drivers/tty/serial/xilinx_uartps.c | 14 ++++++++++----
+ From 28e9b4cd255e3bbb49f0dd6e1fc234e76d046c03 Mon Sep 17 00:00:00 2001
+ From: Sasha Levin <sashal@kernel.org>
+ Date: Mon, 10 Feb 2020 10:18:25 -0700
+ Subject: serial: uartps: Add a timeout to the tx empty wait
+ From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
+ [ Upstream commit 277375b864e8147975b064b513f491e2a910e66a ]
+ In case the cable is not connected then the target gets into
+ an infinite wait for tx empty.
+ Add a timeout to the tx empty wait.
+ Reported-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
+ Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+ Signed-off-by: Sasha Levin <sashal@kernel.org>
+ ---
 -diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
 -index 0dbfd02e3b196..9826a15bfd871 100644
++ drivers/tty/serial/xilinx_uartps.c |   14 ++++++++++----
+  1 file changed, 10 insertions(+), 4 deletions(-)
 -@@ -685,16 +687,20 @@ static void cdns_uart_set_termios(struct uart_port *port,
+ --- a/drivers/tty/serial/xilinx_uartps.c
+ +++ b/drivers/tty/serial/xilinx_uartps.c
+ @@ -31,6 +31,7 @@
+  #include <linux/of.h>
+  #include <linux/module.h>
+  #include <linux/pm_runtime.h>
+ +#include <linux/iopoll.h>
+  
+  #define CDNS_UART_TTY_NAME   "ttyPS"
+  #define CDNS_UART_NAME               "xuartps"
+ @@ -39,6 +40,7 @@
+  #define CDNS_UART_NR_PORTS   2
+  #define CDNS_UART_FIFO_SIZE  64      /* FIFO size */
+  #define CDNS_UART_REGISTER_SPACE     0x1000
+ +#define TX_TIMEOUT           500000
+  
+  /* Rx Trigger level */
+  static int rx_trigger_level = 56;
 --- 
 -2.20.1
 -
++@@ -685,16 +687,20 @@ static void cdns_uart_set_termios(struct
+       unsigned int cval = 0;
+       unsigned int baud, minbaud, maxbaud;
+       unsigned long flags;
+ -     unsigned int ctrl_reg, mode_reg;
+ +     unsigned int ctrl_reg, mode_reg, val;
+ +     int err;
+  
+       spin_lock_irqsave(&port->lock, flags);
+  
+       /* Wait for the transmit FIFO to empty before making changes */
+       if (!(readl(port->membase + CDNS_UART_CR) &
+                               CDNS_UART_CR_TX_DIS)) {
+ -             while (!(readl(port->membase + CDNS_UART_SR) &
+ -                             CDNS_UART_SR_TXEMPTY)) {
+ -                     cpu_relax();
+ +             err = readl_poll_timeout(port->membase + CDNS_UART_SR,
+ +                                      val, (val & CDNS_UART_SR_TXEMPTY),
+ +                                      1000, TX_TIMEOUT);
+ +             if (err) {
+ +                     dev_err(port->dev, "timed out waiting for tx empty");
+ +                     return;
+               }
+       }
+  
index 36db8b099aeacf0823253fd601e2b90832743eac,ad19021729f5e9219db4586af332c642226d93cd..8bc05191c643039fa1cdaf16db76f5a193477160
@@@ -140,11 -140,4 +140,11 @@@ perf-core-fix-mlock-accounting-in-perf_
  rxrpc-fix-service-call-disconnection.patch
  asoc-pcm-update-fe-be-trigger-order-based-on-the-com.patch
  hv_sock-remove-the-accept-port-restriction.patch
- nfs-revalidate-the-file-size-on-a-fatal-write-error.patch
 +rdma-netlink-do-not-always-generate-an-ack-for-some-netlink-operations.patch
 +scsi-ufs-fix-ufshcd_probe_hba-reture-value-in-case-ufshcd_scsi_add_wlus-fails.patch
 +pci-switchtec-fix-vep_vector_number-ioread-width.patch
 +pci-don-t-disable-bridge-bars-when-assigning-bus-resources.patch
 +nfs-nfs_swap-should-depend-on-swap.patch
 +nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch
 +nfsv4-try-lease-recovery-on-nfs4err_expired.patch
+ serial-uartps-add-a-timeout-to-the-tx-empty-wait.patch
index d6d04108ec7da4527ef05fe4162ca29bf9082b44,5ebd33fb334a9127069a2e7963154329d89bc2a9..bf22767d4dd7769e313a7e87589df643acb7076d
@@@ -1,15 -1,6 +1,19 @@@
  asoc-pcm-update-fe-be-trigger-order-based-on-the-com.patch
  hv_sock-remove-the-accept-port-restriction.patch
 +ib-mlx4-fix-memory-leak-in-add_gid-error-flow.patch
 +rdma-netlink-do-not-always-generate-an-ack-for-some-netlink-operations.patch
 +rdma-core-fix-locking-in-ib_uverbs_event_read.patch
 +rdma-uverbs-verify-mr-access-flags.patch
 +scsi-ufs-fix-ufshcd_probe_hba-reture-value-in-case-ufshcd_scsi_add_wlus-fails.patch
 +pci-iov-fix-memory-leak-in-pci_iov_add_virtfn.patch
 +ath10k-pci-only-dump-ath10k_mem_region_type_ioreg-when-safe.patch
 +pci-switchtec-fix-vep_vector_number-ioread-width.patch
 +pci-don-t-disable-bridge-bars-when-assigning-bus-resources.patch
 +nfs-nfs_swap-should-depend-on-swap.patch
 +nfs-revalidate-the-file-size-on-a-fatal-write-error.patch
 +nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch
 +nfsv4-try-lease-recovery-on-nfs4err_expired.patch
+ serial-uartps-add-a-timeout-to-the-tx-empty-wait.patch
+ gpio-zynq-report-gpio-direction-at-boot.patch
+ spi-spi-mem-add-extra-sanity-checks-on-the-op-param.patch
+ spi-spi-mem-fix-inverted-logic-in-op-sanity-check.patch
index 1c0169ae75a51bc1a75056ec884516e7e2cbcbcf,cb12133b87599eecab451132d98a5bfa86a9164c..8ac4e7085ad4fd3cd82930f37ec84e7498882c83
@@@ -1,28 -1,3 +1,29 @@@
  asoc-pcm-update-fe-be-trigger-order-based-on-the-com.patch
  hv_sock-remove-the-accept-port-restriction.patch
 +ib-mlx4-fix-memory-leak-in-add_gid-error-flow.patch
 +ib-srp-never-use-immediate-data-if-it-is-disabled-by-a-user.patch
 +ib-mlx4-fix-leak-in-id_map_find_del.patch
 +rdma-netlink-do-not-always-generate-an-ack-for-some-netlink-operations.patch
 +rdma-i40iw-fix-a-potential-null-pointer-dereference.patch
 +rdma-core-fix-locking-in-ib_uverbs_event_read.patch
 +rdma-uverbs-verify-mr-access-flags.patch
 +rdma-cma-fix-unbalanced-cm_id-reference-count-during-address-resolve.patch
 +rdma-umem-fix-ib_umem_find_best_pgsz.patch
 +scsi-ufs-fix-ufshcd_probe_hba-reture-value-in-case-ufshcd_scsi_add_wlus-fails.patch
 +pci-iov-fix-memory-leak-in-pci_iov_add_virtfn.patch
 +ath10k-pci-only-dump-ath10k_mem_region_type_ioreg-when-safe.patch
 +pci-switchtec-use-dma_set_mask_and_coherent.patch
 +pci-switchtec-fix-vep_vector_number-ioread-width.patch
 +pci-tegra-fix-afi_pex2_ctrl-reg-offset-for-tegra30.patch
 +pci-don-t-disable-bridge-bars-when-assigning-bus-resources.patch
 +pci-aer-initialize-aer_fifo.patch
 +iwlwifi-mvm-avoid-use-after-free-for-pmsr-request.patch
 +nfsd-fixing-possible-null-pointer-derefering-in-copy-offload.patch
 +nfs-nfs_swap-should-depend-on-swap.patch
 +nfs-revalidate-the-file-size-on-a-fatal-write-error.patch
 +nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch
 +nfs-fix-fix-of-show_nfs_errors.patch
 +nfsv4-pnfs_roc-must-use-cred_fscmp-to-compare-creds.patch
 +nfsv4-try-lease-recovery-on-nfs4err_expired.patch
 +nfsv4.0-nfs4_do_fsinfo-should-not-do-implicit-lease-renewals.patch
+ x86-boot-handle-malformed-srat-tables-during-early-a.patch
index 971a8fdd9f0542753bda2c83b52d7fe66977e551,4ed575e63a825ee5ba2da36722b74dbaf8e8945c..c9767ef54abf1e2ba7d6bfa2214f5df11d912746
@@@ -1,35 -1,1 +1,36 @@@
 +ib-mlx4-fix-memory-leak-in-add_gid-error-flow.patch
 +ib-srp-never-use-immediate-data-if-it-is-disabled-by-a-user.patch
 +ib-mlx5-return-the-administrative-guid-if-exists.patch
 +ib-mlx4-fix-leak-in-id_map_find_del.patch
 +rdma-netlink-do-not-always-generate-an-ack-for-some-netlink-operations.patch
 +rdma-i40iw-fix-a-potential-null-pointer-dereference.patch
 +rdma-core-fix-locking-in-ib_uverbs_event_read.patch
 +rdma-uverbs-verify-mr-access-flags.patch
 +rdma-mlx5-fix-handling-of-iova-user_va-in-odp-paths.patch
 +rdma-core-ensure-that-rdma_user_mmap_entry_remove-is-a-fence.patch
 +rdma-cma-fix-unbalanced-cm_id-reference-count-during-address-resolve.patch
 +rdma-umem-fix-ib_umem_find_best_pgsz.patch
 +scsi-ufs-fix-ufshcd_probe_hba-reture-value-in-case-ufshcd_scsi_add_wlus-fails.patch
 +pci-iov-fix-memory-leak-in-pci_iov_add_virtfn.patch
 +ath10k-pci-only-dump-ath10k_mem_region_type_ioreg-when-safe.patch
 +pci-switchtec-use-dma_set_mask_and_coherent.patch
 +pci-switchtec-fix-vep_vector_number-ioread-width.patch
 +pci-tegra-fix-afi_pex2_ctrl-reg-offset-for-tegra30.patch
 +pci-don-t-disable-bridge-bars-when-assigning-bus-resources.patch
 +pci-aer-initialize-aer_fifo.patch
 +iwlwifi-mvm-avoid-use-after-free-for-pmsr-request.patch
 +iwlwifi-mvm-fix-tdls-discovery-with-the-new-firmware-api.patch
 +netfilter-flowtable-fetch-stats-only-if-flow-is-still-alive.patch
 +netfilter-flowtable-restrict-flow-dissector-match-on-meta-ingress-device.patch
 +netfilter-flowtable-fix-hardware-flush-order-on-nf_flow_table_cleanup.patch
 +netfilter-flowtable-fix-missing-flush-hardware-on-table-free.patch
 +nfsd-fixing-possible-null-pointer-derefering-in-copy-offload.patch
 +nfsv4.x-recover-from-pre-mature-loss-of-openstateid.patch
 +nfs-nfs_swap-should-depend-on-swap.patch
 +nfs-revalidate-the-file-size-on-a-fatal-write-error.patch
 +nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch
 +nfs-fix-fix-of-show_nfs_errors.patch
 +nfsv4-pnfs_roc-must-use-cred_fscmp-to-compare-creds.patch
 +nfsv4-try-lease-recovery-on-nfs4err_expired.patch
 +nfsv4.0-nfs4_do_fsinfo-should-not-do-implicit-lease-renewals.patch
+ x86-boot-handle-malformed-srat-tables-during-early-a.patch