]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2019 10:47:03 +0000 (12:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2019 10:47:03 +0000 (12:47 +0200)
added patches:
kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch

queue-4.19/cifs-flush-before-set-info-if-we-have-writeable-handles.patch [deleted file]
queue-4.19/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/cifs-flush-before-set-info-if-we-have-writeable-handles.patch b/queue-4.19/cifs-flush-before-set-info-if-we-have-writeable-handles.patch
deleted file mode 100644 (file)
index 272b3d4..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From aa081859b10c5d8b19f5c525c78883a59d73c2b8 Mon Sep 17 00:00:00 2001
-From: Ronnie Sahlberg <lsahlber@redhat.com>
-Date: Fri, 19 Jul 2019 08:12:11 +1000
-Subject: cifs: flush before set-info if we have writeable handles
-
-From: Ronnie Sahlberg <lsahlber@redhat.com>
-
-commit aa081859b10c5d8b19f5c525c78883a59d73c2b8 upstream.
-
-Servers can defer destaging any data and updating the mtime until close().
-This means that if we do a setinfo to modify the mtime while other handles
-are open for write the server may overwrite our setinfo timestamps when
-if flushes the file on close() of the writeable handle.
-
-To solve this we add an explicit flush when the mtime is about to
-be updated.
-
-This fixes "cp -p" to preserve mtime when copying a file onto an SMB2 share.
-
-CC: Stable <stable@vger.kernel.org>
-Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
-Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
-Signed-off-by: Steve French <stfrench@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- fs/cifs/inode.c |   16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
---- a/fs/cifs/inode.c
-+++ b/fs/cifs/inode.c
-@@ -2366,6 +2366,8 @@ cifs_setattr_nounix(struct dentry *diren
-       struct inode *inode = d_inode(direntry);
-       struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
-       struct cifsInodeInfo *cifsInode = CIFS_I(inode);
-+      struct cifsFileInfo *wfile;
-+      struct cifs_tcon *tcon;
-       char *full_path = NULL;
-       int rc = -EACCES;
-       __u32 dosattr = 0;
-@@ -2407,6 +2409,20 @@ cifs_setattr_nounix(struct dentry *diren
-       mapping_set_error(inode->i_mapping, rc);
-       rc = 0;
-+      if (attrs->ia_valid & ATTR_MTIME) {
-+              rc = cifs_get_writable_file(cifsInode, false, &wfile);
-+              if (!rc) {
-+                      tcon = tlink_tcon(wfile->tlink);
-+                      rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
-+                      cifsFileInfo_put(wfile);
-+                      if (rc)
-+                              return rc;
-+              } else if (rc != -EBADF)
-+                      return rc;
-+              else
-+                      rc = 0;
-+      }
-+
-       if (attrs->ia_valid & ATTR_SIZE) {
-               rc = cifs_set_file_size(inode, attrs, xid, full_path);
-               if (rc != 0)
diff --git a/queue-4.19/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch b/queue-4.19/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch
new file mode 100644 (file)
index 0000000..9637b75
--- /dev/null
@@ -0,0 +1,38 @@
+From 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 Mon Sep 17 00:00:00 2001
+From: Like Xu <like.xu@linux.intel.com>
+Date: Thu, 18 Jul 2019 13:35:14 +0800
+Subject: KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed
+
+From: Like Xu <like.xu@linux.intel.com>
+
+commit 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 upstream.
+
+If a perf_event creation fails due to any reason of the host perf
+subsystem, it has no chance to log the corresponding event for guest
+which may cause abnormal sampling data in guest result. In debug mode,
+this message helps to understand the state of vPMC and we may not
+limit the number of occurrences but not in a spamming style.
+
+Suggested-by: Joe Perches <joe@perches.com>
+Signed-off-by: Like Xu <like.xu@linux.intel.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/pmu.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/kvm/pmu.c
++++ b/arch/x86/kvm/pmu.c
+@@ -131,8 +131,8 @@ static void pmc_reprogram_counter(struct
+                                                intr ? kvm_perf_overflow_intr :
+                                                kvm_perf_overflow, pmc);
+       if (IS_ERR(event)) {
+-              printk_once("kvm_pmu: event creation failed %ld\n",
+-                          PTR_ERR(event));
++              pr_debug_ratelimited("kvm_pmu: event creation failed %ld for pmc->idx = %d\n",
++                          PTR_ERR(event), pmc->idx);
+               return;
+       }
index 065012b48ccd89438b0c72a2a7e5544125d7df3a..f8c85989845045dde6ba90d80a14fdd91ee2f416 100644 (file)
@@ -180,7 +180,6 @@ crypto-crypto4xx-block-ciphers-should-only-accept-complete-blocks.patch
 crypto-ccp-memset-structure-fields-to-zero-before-reuse.patch
 crypto-ccp-gcm-use-const-time-tag-comparison.patch
 crypto-crypto4xx-fix-a-potential-double-free-in-ppc4xx_trng_probe.patch
-cifs-flush-before-set-info-if-we-have-writeable-handles.patch
 revert-bcache-set-cache_set_io_disable-in-bch_cached_dev_error.patch
 bcache-revert-bcache-fix-high-cpu-occupancy-during-journal.patch
 bcache-revert-bcache-free-heap-cache_set-flush_btree-in-bch_journal_free.patch
@@ -211,3 +210,4 @@ media-v4l2-test-type-instead-of-cfg-type-in-v4l2_ctrl_new_custom.patch
 media-coda-remove-unbalanced-and-unneeded-mutex-unlock.patch
 media-videobuf2-core-prevent-size-alignment-wrapping-buffer-size-to-0.patch
 media-videobuf2-dma-sg-prevent-size-from-overflowing.patch
+kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch