From: Greg Kroah-Hartman Date: Tue, 23 Jul 2019 10:47:03 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v5.2.3~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4929a93a52359d5a62a8d1a9285ed63d9a74baa3;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch --- 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 index 272b3d49a06..00000000000 --- a/queue-4.19/cifs-flush-before-set-info-if-we-have-writeable-handles.patch +++ /dev/null @@ -1,61 +0,0 @@ -From aa081859b10c5d8b19f5c525c78883a59d73c2b8 Mon Sep 17 00:00:00 2001 -From: Ronnie Sahlberg -Date: Fri, 19 Jul 2019 08:12:11 +1000 -Subject: cifs: flush before set-info if we have writeable handles - -From: Ronnie Sahlberg - -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 -Signed-off-by: Ronnie Sahlberg -Reviewed-by: Pavel Shilovsky -Signed-off-by: Steve French -Signed-off-by: Greg Kroah-Hartman - ---- - 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 index 00000000000..9637b750599 --- /dev/null +++ b/queue-4.19/kvm-x86-vpmu-refine-kvm_pmu-err-msg-when-event-creation-failed.patch @@ -0,0 +1,38 @@ +From 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 Mon Sep 17 00:00:00 2001 +From: Like Xu +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 + +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 +Signed-off-by: Like Xu +Cc: stable@vger.kernel.org +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } + diff --git a/queue-4.19/series b/queue-4.19/series index 065012b48cc..f8c85989845 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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