tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent
head: 0602ec6c74e25dcb8a43961b00eef168fafb8e5e
commit: 2726fde5f3900552fcae2d2ac07a05ffba11a491 [6/7] irq_work: Cleanup
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 2726fde5f3900552fcae2d2ac07a05ffba11a491
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
> kernel/bpf/stackmap.c:296:21: error: called object type
'bool' (aka '_Bool') is not a function or function pointer
if
(irq_work_busy(&work->irq_work)) {
~~~~~~~~~~~~~^
1 error generated.
vim +296 kernel/bpf/stackmap.c
284
285 static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
286 u64 *ips, u32 trace_nr, bool user)
287 {
288 int i;
289 struct vm_area_struct *vma;
290 bool irq_work_busy = false;
291 struct stack_map_irq_work *work = NULL;
292
293 if (irqs_disabled()) {
294 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
295 work = this_cpu_ptr(&up_read_work);
296 if (irq_work_busy(&work->irq_work)) {
297 /* cannot queue more up_read, fallback */
298 irq_work_busy = true;
299 }
300 } else {
301 /*
302 * PREEMPT_RT does not allow to trylock mmap sem in
303 * interrupt disabled context. Force the fallback code.
304 */
305 irq_work_busy = true;
306 }
307 }
308
309 /*
310 * We cannot do up_read() when the irq is disabled, because of
311 * risk to deadlock with rq_lock. To do build_id lookup when the
312 * irqs are disabled, we need to run up_read() in irq_work. We use
313 * a percpu variable to do the irq_work. If the irq_work is
314 * already used by another lookup, we fall back to report ips.
315 *
316 * Same fallback is used for kernel stack (!user) on a stackmap
317 * with build_id.
318 */
319 if (!user || !current || !current->mm || irq_work_busy ||
320 down_read_trylock(¤t->mm->mmap_sem) == 0) {
321 /* cannot access current->mm, fall back to ips */
322 for (i = 0; i < trace_nr; i++) {
323 id_offs[i].status = BPF_STACK_BUILD_ID_IP;
324 id_offs[i].ip = ips[i];
325 memset(id_offs[i].build_id, 0, BPF_BUILD_ID_SIZE);
326 }
327 return;
328 }
329
330 for (i = 0; i < trace_nr; i++) {
331 vma = find_vma(current->mm, ips[i]);
332 if (!vma || stack_map_get_build_id(vma, id_offs[i].build_id)) {
333 /* per entry fall back to ips */
334 id_offs[i].status = BPF_STACK_BUILD_ID_IP;
335 id_offs[i].ip = ips[i];
336 memset(id_offs[i].build_id, 0, BPF_BUILD_ID_SIZE);
337 continue;
338 }
339 id_offs[i].offset = (vma->vm_pgoff << PAGE_SHIFT) + ips[i]
340 - vma->vm_start;
341 id_offs[i].status = BPF_STACK_BUILD_ID_VALID;
342 }
343
344 if (!work) {
345 up_read(¤t->mm->mmap_sem);
346 } else {
347 work->sem = ¤t->mm->mmap_sem;
348 irq_work_queue(&work->irq_work);
349 /*
350 * The irq_work will release the mmap_sem with
351 * up_read_non_owner(). The rwsem_release() is called
352 * here to release the lock from lockdep's perspective.
353 */
354 rwsem_release(¤t->mm->mmap_sem.dep_map, _RET_IP_);
355 }
356 }
357
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org