aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/pgsize_migration.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/pgsize_migration.c b/mm/pgsize_migration.c
index cfc9886e8835..f6efa492b53d 100644
--- a/mm/pgsize_migration.c
+++ b/mm/pgsize_migration.c
@@ -18,6 +18,7 @@
#include <linux/kstrtox.h>
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
+#include <linux/string.h>
#include <linux/sysfs.h>
typedef void (*show_pad_maps_fn) (struct seq_file *m, struct vm_area_struct *vma);
@@ -182,7 +183,15 @@ static inline bool linker_ctx(void)
memset(buf, 0, bufsize);
path = d_path(&file->f_path, buf, bufsize);
- if (!strcmp(path, "/system/bin/linker64"))
+ /*
+ * Depending on interpreter requested, valid paths could be any of:
+ * 1. /system/bin/bootstrap/linker64
+ * 2. /system/bin/linker64
+ * 3. /apex/com.android.runtime/bin/linker64
+ *
+ * Check the base name (linker64).
+ */
+ if (!strcmp(kbasename(path), "linker64"))
return true;
}