The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b40341fad6cc2daa195f8090fd3348f18fff640a Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
Date: Tue, 29 Sep 2020 12:40:31 -0400
Subject: [PATCH] ftrace: Move RCU is watching check after recursion check
The first thing that the ftrace function callback helper functions should do
is to check for recursion. Peter Zijlstra found that when
"rcu_is_watching()" had its notrace removed, it caused perf function tracing
to crash. This is because the call of rcu_is_watching() is tested before
function recursion is checked and and if it is traced, it will cause an
infinite recursion loop.
rcu_is_watching() should still stay notrace, but to prevent this should
never had crashed in the first place. The recursion prevention must be the
first thing done in callback functions.
Link: https://lore.kernel.org/r/20200929112541.GM2628@hirez.programming.kicks-ass…
Cc: stable(a)vger.kernel.org
Cc: Paul McKenney <paulmck(a)kernel.org>
Fixes: c68c0fa293417 ("ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too")
Acked-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Reported-by: Peter Zijlstra (Intel) <peterz(a)infradead.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 603255f5f085..541453927c82 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -6993,16 +6993,14 @@ static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip,
{
int bit;
- if ((op->flags & FTRACE_OPS_FL_RCU) && !rcu_is_watching())
- return;
-
bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX);
if (bit < 0)
return;
preempt_disable_notrace();
- op->func(ip, parent_ip, op, regs);
+ if (!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching())
+ op->func(ip, parent_ip, op, regs);
preempt_enable_notrace();
trace_clear_recursion(bit);
commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream.
By default, PCI drivers with runtime PM enabled will skip the calls
to suspend and resume on system PM. For this driver, we don't want
that, as we need to perform additional steps for system PM to work
properly on all systems. So instruct the PM core to not skip these
calls.
Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
Reported-by: Volker Rümelin <volker.ruemelin(a)googlemail.com>
Signed-off-by: Jean Delvare <jdelvare(a)suse.de>
Cc: stable(a)vger.kernel.org
Signed-off-by: Wolfram Sang <wsa(a)kernel.org>
---
This is the backported version for kernel trees 5.4 and 4.19. The
difference with the upstream commit is that DPM_FLAG_NEVER_SKIP is used
instead of DPM_FLAG_NO_DIRECT_COMPLETE, which did not exist back then.
drivers/i2c/busses/i2c-i801.c | 1 +
1 file changed, 1 insertion(+)
--- linux-5.4.orig/drivers/i2c/busses/i2c-i801.c 2020-10-05 14:59:14.454238658 +0200
+++ linux-5.4/drivers/i2c/busses/i2c-i801.c 2020-10-05 15:54:31.399988586 +0200
@@ -1891,6 +1891,7 @@ static int i801_probe(struct pci_dev *de
pci_set_drvdata(dev, priv);
+ dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NEVER_SKIP);
pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
pm_runtime_use_autosuspend(&dev->dev);
pm_runtime_put_autosuspend(&dev->dev);
--
Jean Delvare
SUSE L3 Support
This series backports fixes for the xfstests test cases btrfs/199
btrfs/200 btrfs/203 and btrfs/204.
patch 1 is fix for btrfs/200
patch 2 fixes regression in patch 1 and is fix for btrfs/203
patch 3 helps to fix conflicts in patch 4
patch 4 is fix for btrfs/199
patch 5 helps to avoid conflicts in patch6
patch 6 is fix for btrfs/204
patch1 Btrfs: send, allow clone operations within the same file
patch2 Btrfs: send, fix emission of invalid clone operations within the same file
patch3 btrfs: volumes: Use more straightforward way to calculate map length
patch4 btrfs: Ensure we trim ranges across block group boundary
patch5 btrfs: fix RWF_NOWAIT write not failling when we need to cow
patch6 btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation
Filipe Manana (3):
Btrfs: send, allow clone operations within the same file
Btrfs: send, fix emission of invalid clone operations within the same
file
btrfs: fix RWF_NOWAIT write not failling when we need to cow
Qu Wenruo (3):
btrfs: volumes: Use more straightforward way to calculate map length
btrfs: Ensure we trim ranges across block group boundary
btrfs: allow btrfs_truncate_block() to fallback to nocow for data
space reservation
fs/btrfs/ctree.h | 2 ++
fs/btrfs/extent-tree.c | 41 +++++++++++++++++++++++++++++----------
fs/btrfs/file.c | 23 ++++++++++++++++++----
fs/btrfs/inode.c | 44 +++++++++++++++++++++++++++++++++++-------
fs/btrfs/send.c | 19 +++++++++++++-----
fs/btrfs/volumes.c | 8 +++++---
6 files changed, 108 insertions(+), 29 deletions(-)
--
2.25.1
Hi Greg, Sasha,
Can you pick this to 5.4:
commit dbd660e6b2884b864d2642d930a163d3bcebe4be
Author: Tommi Rantala <tommi.t.rantala(a)nokia.com>
Date: Thu Apr 23 14:53:40 2020 +0300
perf test session topology: Fix data path
And this to 5.4 and older LTS trees too:
commit 29b4f5f188571c112713c35cc87eefb46efee612
Author: Tommi Rantala <tommi.t.rantala(a)nokia.com>
Date: Thu Mar 5 10:37:12 2020 +0200
perf top: Fix stdio interface input handling with glibc 2.28+
Thanks!
-Tommi