* FAILED: patch "[PATCH] erofs: fix up erofs_lookup tracepoint" failed to apply to 4.19-stable tree
@ 2021-09-26 13:07 gregkh
2021-09-27 5:26 ` [PATCH 4.19.y] erofs: fix up erofs_lookup tracepoint Gao Xiang
2021-09-27 5:29 ` [PATCH 4.19.y RESEND] " Gao Xiang
0 siblings, 2 replies; 4+ messages in thread
From: gregkh @ 2021-09-26 13:07 UTC (permalink / raw)
To: hsiangkao, chao; +Cc: stable
The patch below does not apply to the 4.19-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@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 93368aab0efc87288cac65e99c9ed2e0ffc9e7d0 Mon Sep 17 00:00:00 2001
From: Gao Xiang <hsiangkao@linux.alibaba.com>
Date: Tue, 21 Sep 2021 22:35:30 +0800
Subject: [PATCH] erofs: fix up erofs_lookup tracepoint
Fix up a misuse that the filename pointer isn't always valid in
the ring buffer, and we should copy the content instead.
Link: https://lore.kernel.org/r/20210921143531.81356-1-hsiangkao@linux.alibaba.com
Fixes: 13f06f48f7bf ("staging: erofs: support tracepoint")
Cc: stable@vger.kernel.org # 4.19+
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h
index bf9806fd1306..db4f2cec8360 100644
--- a/include/trace/events/erofs.h
+++ b/include/trace/events/erofs.h
@@ -35,20 +35,20 @@ TRACE_EVENT(erofs_lookup,
TP_STRUCT__entry(
__field(dev_t, dev )
__field(erofs_nid_t, nid )
- __field(const char *, name )
+ __string(name, dentry->d_name.name )
__field(unsigned int, flags )
),
TP_fast_assign(
__entry->dev = dir->i_sb->s_dev;
__entry->nid = EROFS_I(dir)->nid;
- __entry->name = dentry->d_name.name;
+ __assign_str(name, dentry->d_name.name);
__entry->flags = flags;
),
TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x",
show_dev_nid(__entry),
- __entry->name,
+ __get_str(name),
__entry->flags)
);
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4.19.y] erofs: fix up erofs_lookup tracepoint
2021-09-26 13:07 FAILED: patch "[PATCH] erofs: fix up erofs_lookup tracepoint" failed to apply to 4.19-stable tree gregkh
@ 2021-09-27 5:26 ` Gao Xiang
2021-09-27 5:29 ` [PATCH 4.19.y RESEND] " Gao Xiang
1 sibling, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2021-09-27 5:26 UTC (permalink / raw)
To: stable, gregkh; +Cc: linux-erofs, Gao Xiang, Chao Yu
Fix up a misuse that the filename pointer isn't always valid in
the ring buffer, and we should copy the content instead.
Link: https://lore.kernel.org/r/20210921143531.81356-1-hsiangkao@linux.alibaba.com
Fixes: 13f06f48f7bf ("staging: erofs: support tracepoint")
Cc: stable@vger.kernel.org # 4.19+
Reviewed-by: Chao Yu <chao@kernel.org>
[ Gao Xiang: resolve trivial conflicts for 4.19.y. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
drivers/staging/erofs/include/trace/events/erofs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/include/trace/events/erofs.h b/drivers/staging/erofs/include/trace/events/erofs.h
index 5aead93a762f..852c94176d1b 100644
--- a/drivers/staging/erofs/include/trace/events/erofs.h
+++ b/drivers/staging/erofs/include/trace/events/erofs.h
@@ -32,20 +32,20 @@ TRACE_EVENT(erofs_lookup,
TP_STRUCT__entry(
__field(dev_t, dev )
__field(erofs_nid_t, nid )
- __field(const char *, name )
+ __string(name, dentry->d_name.name )
__field(unsigned int, flags )
),
TP_fast_assign(
__entry->dev = dir->i_sb->s_dev;
__entry->nid = EROFS_V(dir)->nid;
- __entry->name = dentry->d_name.name;
+ __assign_str(name, dentry->d_name.name);
__entry->flags = flags;
),
TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x",
show_dev_nid(__entry),
- __entry->name,
+ __get_str(name),
__entry->flags)
);
--
2.24.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4.19.y RESEND] erofs: fix up erofs_lookup tracepoint
2021-09-26 13:07 FAILED: patch "[PATCH] erofs: fix up erofs_lookup tracepoint" failed to apply to 4.19-stable tree gregkh
2021-09-27 5:26 ` [PATCH 4.19.y] erofs: fix up erofs_lookup tracepoint Gao Xiang
@ 2021-09-27 5:29 ` Gao Xiang
2021-09-27 11:03 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Gao Xiang @ 2021-09-27 5:29 UTC (permalink / raw)
To: stable, gregkh; +Cc: linux-erofs, Gao Xiang, Chao Yu
commit 93368aab0efc87288cac65e99c9ed2e0ffc9e7d0 upstream.
Fix up a misuse that the filename pointer isn't always valid in
the ring buffer, and we should copy the content instead.
Link: https://lore.kernel.org/r/20210921143531.81356-1-hsiangkao@linux.alibaba.com
Fixes: 13f06f48f7bf ("staging: erofs: support tracepoint")
Cc: stable@vger.kernel.org # 4.19+
Reviewed-by: Chao Yu <chao@kernel.org>
[ Gao Xiang: resolve trivial conflicts for 4.19.y. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
add missing upstream commit id...
drivers/staging/erofs/include/trace/events/erofs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/include/trace/events/erofs.h b/drivers/staging/erofs/include/trace/events/erofs.h
index 5aead93a762f..852c94176d1b 100644
--- a/drivers/staging/erofs/include/trace/events/erofs.h
+++ b/drivers/staging/erofs/include/trace/events/erofs.h
@@ -32,20 +32,20 @@ TRACE_EVENT(erofs_lookup,
TP_STRUCT__entry(
__field(dev_t, dev )
__field(erofs_nid_t, nid )
- __field(const char *, name )
+ __string(name, dentry->d_name.name )
__field(unsigned int, flags )
),
TP_fast_assign(
__entry->dev = dir->i_sb->s_dev;
__entry->nid = EROFS_V(dir)->nid;
- __entry->name = dentry->d_name.name;
+ __assign_str(name, dentry->d_name.name);
__entry->flags = flags;
),
TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x",
show_dev_nid(__entry),
- __entry->name,
+ __get_str(name),
__entry->flags)
);
--
2.24.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-27 11:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-26 13:07 FAILED: patch "[PATCH] erofs: fix up erofs_lookup tracepoint" failed to apply to 4.19-stable tree gregkh
2021-09-27 5:26 ` [PATCH 4.19.y] erofs: fix up erofs_lookup tracepoint Gao Xiang
2021-09-27 5:29 ` [PATCH 4.19.y RESEND] " Gao Xiang
2021-09-27 11:03 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox