From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android16-6.12-2025-08 1/1] mm/pgsize_migration.c:204:11: error: call to undeclared function 'vma_start_read_locked'; ISO C99 and later do not support implicit function declarations
Date: Tue, 31 Mar 2026 12:45:03 +0800 [thread overview]
Message-ID: <202603311259.59mcMJMB-lkp@intel.com> (raw)
tree: https://android.googlesource.com/kernel/common android16-6.12-2025-08
head: feb767273b096a7c07872106ddb1cdcbfa682fcd
commit: c691ab2c1e67fe61744eb8935689b7f9648dc97d [1/1] ANDROID: look up vma under RCU in linker_ctx()
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260331/202603311259.59mcMJMB-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603311259.59mcMJMB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603311259.59mcMJMB-lkp@intel.com/
All errors (new ones prefixed by >>):
>> mm/pgsize_migration.c:204:11: error: call to undeclared function 'vma_start_read_locked'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
204 | BUG_ON(!vma_start_read_locked(vma));
| ^
1 error generated.
vim +/vma_start_read_locked +204 mm/pgsize_migration.c
156
157 /*
158 * The dynamic linker, or interpreter, operates within the process context
159 * of the binary that necessitated dynamic linking.
160 *
161 * Consequently, process context identifiers; like PID, comm, ...; cannot
162 * be used to differentiate whether the execution context belongs to the
163 * dynamic linker or not.
164 *
165 * linker_ctx() deduces whether execution is currently in the dynamic linker's
166 * context by correlating the current userspace instruction pointer with the
167 * VMAs of the current task.
168 *
169 * Returns true if in linker context, otherwise false.
170 */
171 static inline bool linker_ctx(void)
172 {
173 struct pt_regs *regs = task_pt_regs(current);
174 struct mm_struct *mm = current->mm;
175 struct vm_area_struct *vma;
176 struct file *file;
177
178 if (!regs)
179 return false;
180
181 vma = lock_vma_under_rcu(mm, instruction_pointer(regs));
182
183 /*
184 * lock_vma_under_rcu() is a try-lock that can fail if the
185 * VMA is already locked for modification.
186 *
187 * Fallback to finding the vma under mmap read lock.
188 */
189 if (!vma) {
190 mmap_read_lock(mm);
191
192 vma = find_vma(mm, instruction_pointer(regs));
193
194 /* Current execution context, the VMA must be present */
195 BUG_ON(!vma);
196
197 /*
198 * We cannot use vma_start_read() as it may fail due to
199 * false locked (see comment in vma_start_read()). We
200 * can avoid that by using vma_start_read_locked under
201 * mmap_lock, which guarantees that nobody can lock the
202 * vma for write (vma_start_write()) under us.
203 */
> 204 BUG_ON(!vma_start_read_locked(vma));
205
206 mmap_read_unlock(mm);
207 }
208
209 file = vma->vm_file;
210 if (!file)
211 goto out;
212
213 if ((vma->vm_flags & VM_EXEC)) {
214 char buf[64];
215 const int bufsize = sizeof(buf);
216 char *path;
217
218 memset(buf, 0, bufsize);
219 path = d_path(&file->f_path, buf, bufsize);
220
221 /*
222 * Depending on interpreter requested, valid paths could be any of:
223 * 1. /system/bin/bootstrap/linker64
224 * 2. /system/bin/linker64
225 * 3. /apex/com.android.runtime/bin/linker64
226 *
227 * Check the base name (linker64).
228 */
229 if (!strcmp(kbasename(path), "linker64")) {
230 vma_end_read(vma);
231 return true;
232 }
233 }
234 out:
235 vma_end_read(vma);
236 return false;
237 }
238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-03-31 4:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603311259.59mcMJMB-lkp@intel.com \
--to=lkp@intel.com \
--cc=cros-kernel-buildreports@googlegroups.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.