[tip:tmp.tmp2 108/364] arch/x86/include/asm/uaccess.h:47:16: error: implicit declaration of function 'in_task'; did you mean 'rt_task'?

From: kernel test robot
Date: Sun Jun 13 2021 - 17:39:06 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05 [108/364] sched/headers: Remove <linux/mutex.h> from <linux/sched.h>
config: i386-defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip tmp.tmp2
git checkout a8bbfcd6b3ffac4ebcc0deb770d628fe6b8f2d05
# save the attached .config to linux build tree
make W=1 ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/kernel.h:10,
from kernel/locking/rwsem.c:19:
arch/x86/include/asm/uaccess.h: In function 'user_access_begin':
>> arch/x86/include/asm/uaccess.h:47:16: error: implicit declaration of function 'in_task'; did you mean 'rt_task'? [-Werror=implicit-function-declaration]
47 | WARN_ON_ONCE(!in_task() && !pagefault_disabled())
| ^~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
arch/x86/include/asm/uaccess.h:47:2: note: in expansion of macro 'WARN_ON_ONCE'
47 | WARN_ON_ONCE(!in_task() && !pagefault_disabled())
| ^~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:71:2: note: in expansion of macro 'WARN_ON_IN_IRQ'
71 | WARN_ON_IN_IRQ(); \
| ^~~~~~~~~~~~~~
arch/x86/include/asm/uaccess.h:476:16: note: in expansion of macro 'access_ok'
476 | if (unlikely(!access_ok(ptr,len)))
| ^~~~~~~~~
cc1: some warnings being treated as errors


vim +47 arch/x86/include/asm/uaccess.h

ca23386216b9d4 include/asm-x86/uaccess.h Glauber Costa 2008-06-13 43
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 44 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 45 static inline bool pagefault_disabled(void);
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 46 # define WARN_ON_IN_IRQ() \
2d8d8fac3b4eab arch/x86/include/asm/uaccess.h Masami Hiramatsu 2019-05-15 @47 WARN_ON_ONCE(!in_task() && !pagefault_disabled())
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 48 #else
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 49 # define WARN_ON_IN_IRQ()
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 50 #endif
7c4788950ba592 arch/x86/include/asm/uaccess.h Peter Zijlstra 2016-11-22 51

:::::: The code at line 47 was first introduced by commit
:::::: 2d8d8fac3b4eab035dcd0068e1f5a746a697fbb3 x86/uaccess: Allow access_ok() in irq context if pagefault_disabled

:::::: TO: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
:::::: CC: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip