Skip to contentSkip to conversation

FAILED: patch "[PATCH] erofs: fix up erofs_lookup tracepoint" failed to apply to 4.19-stable tree

PATCH Superseded [email protected] 2 participants 4 messages Sep 26, 2021 – Sep 27, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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 <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 93368aab0efc87288cac65e99c9ed2e0ffc9e7d0 Mon Sep 17 00:00:00 2001
From: Gao Xiang <[email protected]>
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.

Fixes 13f06f48f7bf ("staging: erofs: support tracepoint")
include/trace/events/erofs.h +3 -3
index bf9806fd1306..db4f2cec8360 100644
@@ -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)
 );
 
#1 lore raw

PATCH 1/1 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.

Fixes 13f06f48f7bf ("staging: erofs: support tracepoint")
[ Gao Xiang: resolve trivial conflicts for 4.19.y. ]
---
 drivers/staging/erofs/include/trace/events/erofs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/erofs/include/trace/events/erofs.h +3 -3
index 5aead93a762f..852c94176d1b 100644
@@ -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)
 );
 
Signature · 1 line
2.24.4
#2 lore raw

PATCH RESEND 1/1 erofs: fix up erofs_lookup tracepoint

In reply to [email protected]

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.

Fixes 13f06f48f7bf ("staging: erofs: support tracepoint")
[ Gao Xiang: resolve trivial conflicts for 4.19.y. ]

---
add missing upstream commit id...

 drivers/staging/erofs/include/trace/events/erofs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/erofs/include/trace/events/erofs.h +3 -3
index 5aead93a762f..852c94176d1b 100644
@@ -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)
 );
 
Signature · 1 line
2.24.4
author maintainer
#3 lore raw

Re: [PATCH 4.19.y RESEND] erofs: fix up erofs_lookup tracepoint

Quoted 5 lines · Gao Xiang

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.

Quoted 8 lines
Fixes 13f06f48f7bf ("staging: erofs: support tracepoint")
[ Gao Xiang: resolve trivial conflicts for 4.19.y. ]

---
add missing upstream commit id...

Now queued up, thanks.

greg k-h