diff mbox series

[RFC,09/10] ftrace: Use module writable address

Message ID 20201120202426.18009-10-rick.p.edgecombe@intel.com (mailing list archive)
State RFC
Headers show
Series New permission vmalloc interface | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Edgecombe, Rick P Nov. 20, 2020, 8:24 p.m. UTC
Use the module writable address to accommodate arch's that have a
separate writable address for perm_alloc.

Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
---
 kernel/trace/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 8185f7240095..ea6377108bab 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -6134,7 +6134,7 @@  static int ftrace_process_locs(struct module *mod,
 	if (!count)
 		return 0;
 
-	sort(start, count, sizeof(*start),
+	sort(module_adjust_writable_addr(start), count, sizeof(*start),
 	     ftrace_cmp_ips, NULL);
 
 	start_pg = ftrace_allocate_pages(count);