[jlelli:fixes/rt-double_enqueue 1/1] kernel/sched/core.c:7082:6: warning: variable 'new_effective_prio' is used uninitialized whenever 'if' condition is false
by kernel test robot
tree: https://github.com/jlelli/linux.git fixes/rt-double_enqueue
head: f06324e1cbda29c75934fd8596ec7048deb9d810
commit: f06324e1cbda29c75934fd8596ec7048deb9d810 [1/1] sched/rt: Fix double enqueue cause by rt_effective_prio
config: x86_64-randconfig-a001-20210614 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
# https://github.com/jlelli/linux/commit/f06324e1cbda29c75934fd8596ec7048de...
git remote add jlelli https://github.com/jlelli/linux.git
git fetch --no-tags jlelli fixes/rt-double_enqueue
git checkout f06324e1cbda29c75934fd8596ec7048deb9d810
# 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 warnings (new ones prefixed by >>):
kernel/sched/core.c:3277:13: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
struct rq *rq;
^
>> kernel/sched/core.c:7082:6: warning: variable 'new_effective_prio' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (pi) {
^~
kernel/sched/core.c:7107:34: note: uninitialized use occurs here
__setscheduler(rq, p, attr, pi, new_effective_prio);
^~~~~~~~~~~~~~~~~~
kernel/sched/core.c:7082:2: note: remove the 'if' if its condition is always true
if (pi) {
^~~~~~~~
kernel/sched/core.c:6884:24: note: initialize the variable 'new_effective_prio' to silence this warning
int new_effective_prio, policy = attr->sched_policy;
^
= 0
kernel/sched/core.c:3267:20: warning: unused function 'rq_has_pinned_tasks' [-Wunused-function]
static inline bool rq_has_pinned_tasks(struct rq *rq)
^
kernel/sched/core.c:5115:20: warning: unused function 'sched_tick_start' [-Wunused-function]
static inline void sched_tick_start(int cpu) { }
^
kernel/sched/core.c:5116:20: warning: unused function 'sched_tick_stop' [-Wunused-function]
static inline void sched_tick_stop(int cpu) { }
^
kernel/sched/core.c:5773:20: warning: unused function 'sched_core_cpu_starting' [-Wunused-function]
static inline void sched_core_cpu_starting(unsigned int cpu) {}
^
6 warnings generated.
vim +7082 kernel/sched/core.c
c69e8d9c01db2a kernel/sched.c David Howells 2008-11-14 6876
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6877 static int __sched_setscheduler(struct task_struct *p,
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6878 const struct sched_attr *attr,
dbc7f069b93a24 kernel/sched/core.c Peter Zijlstra 2015-06-11 6879 bool user, bool pi)
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6880 {
383afd0971538b kernel/sched/core.c Steven Rostedt 2014-03-11 6881 int newprio = dl_policy(attr->sched_policy) ? MAX_DL_PRIO - 1 :
383afd0971538b kernel/sched/core.c Steven Rostedt 2014-03-11 6882 MAX_RT_PRIO - 1 - attr->sched_priority;
da0c1e65b51a28 kernel/sched/core.c Kirill Tkhai 2014-08-20 6883 int retval, oldprio, oldpolicy = -1, queued, running;
0782e63bc6fe7e kernel/sched/core.c Thomas Gleixner 2015-05-05 6884 int new_effective_prio, policy = attr->sched_policy;
83ab0aa0d5623d kernel/sched.c Thomas Gleixner 2010-02-17 6885 const struct sched_class *prev_class;
565790d28b1e33 kernel/sched/core.c Peter Zijlstra 2020-05-11 6886 struct callback_head *head;
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 6887 struct rq_flags rf;
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6888 int reset_on_fork;
7a57f32a4d5c80 kernel/sched/core.c Peter Zijlstra 2017-02-21 6889 int queue_flags = DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 6890 struct rq *rq;
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6891
896bbb2522587e kernel/sched/core.c Steven Rostedt (VMware 2017-03-09 6892) /* The pi code expects interrupts enabled */
896bbb2522587e kernel/sched/core.c Steven Rostedt (VMware 2017-03-09 6893) BUG_ON(pi && in_interrupt());
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6894 recheck:
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6895 /* Double check policy once rq lock held: */
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6896 if (policy < 0) {
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6897 reset_on_fork = p->sched_reset_on_fork;
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6898 policy = oldpolicy = p->policy;
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6899 } else {
7479f3c9cf67ed kernel/sched/core.c Peter Zijlstra 2014-01-15 6900 reset_on_fork = !!(attr->sched_flags & SCHED_FLAG_RESET_ON_FORK);
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6901
20f9cd2acb1d74 kernel/sched/core.c Henrik Austad 2015-09-09 6902 if (!valid_policy(policy))
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6903 return -EINVAL;
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6904 }
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6905
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 6906 if (attr->sched_flags & ~(SCHED_FLAG_ALL | SCHED_FLAG_SUGOV))
7479f3c9cf67ed kernel/sched/core.c Peter Zijlstra 2014-01-15 6907 return -EINVAL;
7479f3c9cf67ed kernel/sched/core.c Peter Zijlstra 2014-01-15 6908
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6909 /*
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6910 * Valid priorities for SCHED_FIFO and SCHED_RR are
ae18ad281e8259 kernel/sched/core.c Dietmar Eggemann 2021-01-28 6911 * 1..MAX_RT_PRIO-1, valid priority for SCHED_NORMAL,
dd41f596cda0d7 kernel/sched.c Ingo Molnar 2007-07-09 6912 * SCHED_BATCH and SCHED_IDLE is 0.
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6913 */
ae18ad281e8259 kernel/sched/core.c Dietmar Eggemann 2021-01-28 6914 if (attr->sched_priority > MAX_RT_PRIO-1)
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6915 return -EINVAL;
aab03e05e8f7e2 kernel/sched/core.c Dario Faggioli 2013-11-28 6916 if ((dl_policy(policy) && !__checkparam_dl(attr)) ||
aab03e05e8f7e2 kernel/sched/core.c Dario Faggioli 2013-11-28 6917 (rt_policy(policy) != (attr->sched_priority != 0)))
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6918 return -EINVAL;
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6919
37e4ab3f0cba13 kernel/sched.c Olivier Croquette 2005-06-25 6920 /*
37e4ab3f0cba13 kernel/sched.c Olivier Croquette 2005-06-25 6921 * Allow unprivileged RT tasks to decrease priority:
37e4ab3f0cba13 kernel/sched.c Olivier Croquette 2005-06-25 6922 */
961ccddd59d627 kernel/sched.c Rusty Russell 2008-06-23 6923 if (user && !capable(CAP_SYS_NICE)) {
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6924 if (fair_policy(policy)) {
d0ea026808ad81 kernel/sched/core.c Dongsheng Yang 2014-01-27 6925 if (attr->sched_nice < task_nice(p) &&
eaad45132c564c kernel/sched/core.c Peter Zijlstra 2014-01-16 6926 !can_nice(p, attr->sched_nice))
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6927 return -EPERM;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6928 }
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6929
e05606d3301525 kernel/sched.c Ingo Molnar 2007-07-09 6930 if (rt_policy(policy)) {
a44702e8858a07 kernel/sched.c Oleg Nesterov 2010-06-11 6931 unsigned long rlim_rtprio =
a44702e8858a07 kernel/sched.c Oleg Nesterov 2010-06-11 6932 task_rlimit(p, RLIMIT_RTPRIO);
5fe1d75f349740 kernel/sched.c Oleg Nesterov 2006-09-29 6933
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6934 /* Can't set/change the rt policy: */
8dc3e9099e01df kernel/sched.c Oleg Nesterov 2006-09-29 6935 if (policy != p->policy && !rlim_rtprio)
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6936 return -EPERM;
8dc3e9099e01df kernel/sched.c Oleg Nesterov 2006-09-29 6937
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6938 /* Can't increase priority: */
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6939 if (attr->sched_priority > p->rt_priority &&
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 6940 attr->sched_priority > rlim_rtprio)
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6941 return -EPERM;
8dc3e9099e01df kernel/sched.c Oleg Nesterov 2006-09-29 6942 }
c02aa73b1d18e4 kernel/sched.c Darren Hart 2011-02-17 6943
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6944 /*
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6945 * Can't set/change SCHED_DEADLINE policy at all for now
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6946 * (safest behavior); in the future we would like to allow
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6947 * unprivileged DL tasks to increase their relative deadline
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6948 * or reduce their runtime (both ways reducing utilization)
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6949 */
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6950 if (dl_policy(policy))
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6951 return -EPERM;
d44753b843e093 kernel/sched/core.c Juri Lelli 2014-03-03 6952
dd41f596cda0d7 kernel/sched.c Ingo Molnar 2007-07-09 6953 /*
c02aa73b1d18e4 kernel/sched.c Darren Hart 2011-02-17 6954 * Treat SCHED_IDLE as nice 20. Only allow a switch to
c02aa73b1d18e4 kernel/sched.c Darren Hart 2011-02-17 6955 * SCHED_NORMAL if the RLIMIT_NICE would normally permit it.
dd41f596cda0d7 kernel/sched.c Ingo Molnar 2007-07-09 6956 */
1da1843f9f0334 kernel/sched/core.c Viresh Kumar 2018-11-05 6957 if (task_has_idle_policy(p) && !idle_policy(policy)) {
d0ea026808ad81 kernel/sched/core.c Dongsheng Yang 2014-01-27 6958 if (!can_nice(p, task_nice(p)))
dd41f596cda0d7 kernel/sched.c Ingo Molnar 2007-07-09 6959 return -EPERM;
c02aa73b1d18e4 kernel/sched.c Darren Hart 2011-02-17 6960 }
8dc3e9099e01df kernel/sched.c Oleg Nesterov 2006-09-29 6961
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6962 /* Can't change other user's priorities: */
c69e8d9c01db2a kernel/sched.c David Howells 2008-11-14 6963 if (!check_same_owner(p))
37e4ab3f0cba13 kernel/sched.c Olivier Croquette 2005-06-25 6964 return -EPERM;
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6965
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6966 /* Normal users shall not reset the sched_reset_on_fork flag: */
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6967 if (p->sched_reset_on_fork && !reset_on_fork)
ca94c442535a44 kernel/sched.c Lennart Poettering 2009-06-15 6968 return -EPERM;
37e4ab3f0cba13 kernel/sched.c Olivier Croquette 2005-06-25 6969 }
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6970
725aad24c3ba96 kernel/sched.c Jeremy Fitzhardinge 2008-08-03 6971 if (user) {
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 6972 if (attr->sched_flags & SCHED_FLAG_SUGOV)
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 6973 return -EINVAL;
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 6974
b0ae1981137503 kernel/sched.c KOSAKI Motohiro 2010-10-15 6975 retval = security_task_setscheduler(p);
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6976 if (retval)
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6977 return retval;
725aad24c3ba96 kernel/sched.c Jeremy Fitzhardinge 2008-08-03 6978 }
725aad24c3ba96 kernel/sched.c Jeremy Fitzhardinge 2008-08-03 6979
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6980 /* Update task specific "requested" clamps */
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6981 if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP) {
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6982 retval = uclamp_validate(p, attr);
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6983 if (retval)
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6984 return retval;
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6985 }
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 6986
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 6987 if (pi)
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 6988 cpuset_read_lock();
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 6989
b29739f902ee76 kernel/sched.c Ingo Molnar 2006-06-27 6990 /*
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 6991 * Make sure no PI-waiters arrive (or leave) while we are
b29739f902ee76 kernel/sched.c Ingo Molnar 2006-06-27 6992 * changing the priority of the task:
0122ec5b02f766 kernel/sched.c Peter Zijlstra 2011-04-05 6993 *
25985edcedea63 kernel/sched.c Lucas De Marchi 2011-03-30 6994 * To be able to change p->policy safely, the appropriate
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6995 * runqueue lock must be held.
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 6996 */
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 6997 rq = task_rq_lock(p, &rf);
80f5c1b84baa81 kernel/sched/core.c Peter Zijlstra 2016-10-03 6998 update_rq_clock(rq);
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 6999
34f971f6f7988b kernel/sched.c Peter Zijlstra 2010-09-22 7000 /*
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7001 * Changing the policy of the stop threads its a very bad idea:
34f971f6f7988b kernel/sched.c Peter Zijlstra 2010-09-22 7002 */
34f971f6f7988b kernel/sched.c Peter Zijlstra 2010-09-22 7003 if (p == rq->stop) {
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7004 retval = -EINVAL;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7005 goto unlock;
34f971f6f7988b kernel/sched.c Peter Zijlstra 2010-09-22 7006 }
34f971f6f7988b kernel/sched.c Peter Zijlstra 2010-09-22 7007
a51e91981870d0 kernel/sched.c Dario Faggioli 2011-03-24 7008 /*
d6b1e9119787fd kernel/sched/core.c Thomas Gleixner 2014-02-07 7009 * If not changing anything there's no need to proceed further,
d6b1e9119787fd kernel/sched/core.c Thomas Gleixner 2014-02-07 7010 * but store a possible modification of reset_on_fork.
a51e91981870d0 kernel/sched.c Dario Faggioli 2011-03-24 7011 */
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7012 if (unlikely(policy == p->policy)) {
d0ea026808ad81 kernel/sched/core.c Dongsheng Yang 2014-01-27 7013 if (fair_policy(policy) && attr->sched_nice != task_nice(p))
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7014 goto change;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7015 if (rt_policy(policy) && attr->sched_priority != p->rt_priority)
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7016 goto change;
75381608e8410a kernel/sched/core.c Wanpeng Li 2014-11-26 7017 if (dl_policy(policy) && dl_param_changed(p, attr))
aab03e05e8f7e2 kernel/sched/core.c Dario Faggioli 2013-11-28 7018 goto change;
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 7019 if (attr->sched_flags & SCHED_FLAG_UTIL_CLAMP)
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 7020 goto change;
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7021
d6b1e9119787fd kernel/sched/core.c Thomas Gleixner 2014-02-07 7022 p->sched_reset_on_fork = reset_on_fork;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7023 retval = 0;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7024 goto unlock;
a51e91981870d0 kernel/sched.c Dario Faggioli 2011-03-24 7025 }
d50dde5a10f305 kernel/sched/core.c Dario Faggioli 2013-11-07 7026 change:
a51e91981870d0 kernel/sched.c Dario Faggioli 2011-03-24 7027
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7028 if (user) {
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7029 #ifdef CONFIG_RT_GROUP_SCHED
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7030 /*
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7031 * Do not allow realtime tasks into groups that have no runtime
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7032 * assigned.
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7033 */
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7034 if (rt_bandwidth_enabled() && rt_policy(policy) &&
f44937718ce3b8 kernel/sched.c Mike Galbraith 2011-01-13 7035 task_group(p)->rt_bandwidth.rt_runtime == 0 &&
f44937718ce3b8 kernel/sched.c Mike Galbraith 2011-01-13 7036 !task_group_is_autogroup(task_group(p))) {
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7037 retval = -EPERM;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7038 goto unlock;
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7039 }
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7040 #endif
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7041 #ifdef CONFIG_SMP
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 7042 if (dl_bandwidth_enabled() && dl_policy(policy) &&
794a56ebd9a57d kernel/sched/core.c Juri Lelli 2017-12-04 7043 !(attr->sched_flags & SCHED_FLAG_SUGOV)) {
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7044 cpumask_t *span = rq->rd->span;
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7045
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7046 /*
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7047 * Don't allow tasks with an affinity mask smaller than
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7048 * the entire root_domain to become SCHED_DEADLINE. We
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7049 * will also fail if there's no bandwidth available.
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7050 */
3bd3706251ee8a kernel/sched/core.c Sebastian Andrzej Siewior 2019-04-23 7051 if (!cpumask_subset(span, p->cpus_ptr) ||
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7052 rq->rd->dl_bw.bw == 0) {
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7053 retval = -EPERM;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7054 goto unlock;
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7055 }
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7056 }
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7057 #endif
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7058 }
dc61b1d65e353d kernel/sched.c Peter Zijlstra 2010-06-08 7059
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7060 /* Re-check policy now with rq lock held: */
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7061 if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) {
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7062 policy = oldpolicy = -1;
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 7063 task_rq_unlock(rq, p, &rf);
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7064 if (pi)
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7065 cpuset_read_unlock();
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7066 goto recheck;
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7067 }
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7068
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7069 /*
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7070 * If setscheduling to SCHED_DEADLINE (or changing the parameters
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7071 * of a SCHED_DEADLINE task) we need to check if enough bandwidth
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7072 * is available.
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7073 */
06a76fe08d4daa kernel/sched/core.c Nicolas Pitre 2017-06-21 7074 if ((dl_policy(policy) || dl_task(p)) && sched_dl_overflow(p, policy, attr)) {
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7075 retval = -EBUSY;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7076 goto unlock;
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7077 }
332ac17ef5bfcf kernel/sched/core.c Dario Faggioli 2013-11-07 7078
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7079 p->sched_reset_on_fork = reset_on_fork;
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7080 oldprio = p->prio;
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7081
dbc7f069b93a24 kernel/sched/core.c Peter Zijlstra 2015-06-11 @7082 if (pi) {
f06324e1cbda29 kernel/sched/core.c Juri Lelli 2021-04-23 7083 newprio = fair_policy(attr->sched_policy) ?
f06324e1cbda29 kernel/sched/core.c Juri Lelli 2021-04-23 7084 NICE_TO_PRIO(attr->sched_nice) : newprio;
f06324e1cbda29 kernel/sched/core.c Juri Lelli 2021-04-23 7085
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7086 /*
0782e63bc6fe7e kernel/sched/core.c Thomas Gleixner 2015-05-05 7087 * Take priority boosted tasks into account. If the new
0782e63bc6fe7e kernel/sched/core.c Thomas Gleixner 2015-05-05 7088 * effective priority is unchanged, we just store the new
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7089 * normal parameters and do not touch the scheduler class and
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7090 * the runqueue. This will be done when the task deboost
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7091 * itself.
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7092 */
acd58620e415ae kernel/sched/core.c Peter Zijlstra 2017-03-23 7093 new_effective_prio = rt_effective_prio(p, newprio);
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7094 if (new_effective_prio == oldprio)
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7095 queue_flags &= ~DEQUEUE_MOVE;
dbc7f069b93a24 kernel/sched/core.c Peter Zijlstra 2015-06-11 7096 }
c365c292d05908 kernel/sched/core.c Thomas Gleixner 2014-02-07 7097
da0c1e65b51a28 kernel/sched/core.c Kirill Tkhai 2014-08-20 7098 queued = task_on_rq_queued(p);
051a1d1afa4720 kernel/sched.c Dmitry Adamushko 2007-12-18 7099 running = task_current(rq, p);
da0c1e65b51a28 kernel/sched/core.c Kirill Tkhai 2014-08-20 7100 if (queued)
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7101 dequeue_task(rq, p, queue_flags);
83b699ed20f521 kernel/sched.c Srivatsa Vaddagiri 2007-10-15 7102 if (running)
f3cd1c4ec059c9 kernel/sched/core.c Kirill Tkhai 2014-09-12 7103 put_prev_task(rq, p);
f6b53205e17c8c kernel/sched.c Dmitry Adamushko 2007-10-15 7104
83ab0aa0d5623d kernel/sched.c Thomas Gleixner 2010-02-17 7105 prev_class = p->sched_class;
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 7106
f06324e1cbda29 kernel/sched/core.c Juri Lelli 2021-04-23 7107 __setscheduler(rq, p, attr, pi, new_effective_prio);
a509a7cd797470 kernel/sched/core.c Patrick Bellasi 2019-06-21 7108 __setscheduler_uclamp(p, attr);
f6b53205e17c8c kernel/sched.c Dmitry Adamushko 2007-10-15 7109
da0c1e65b51a28 kernel/sched/core.c Kirill Tkhai 2014-08-20 7110 if (queued) {
81a44c5441d7f7 kernel/sched/core.c Thomas Gleixner 2014-02-07 7111 /*
81a44c5441d7f7 kernel/sched/core.c Thomas Gleixner 2014-02-07 7112 * We enqueue to tail when the priority of a task is
81a44c5441d7f7 kernel/sched/core.c Thomas Gleixner 2014-02-07 7113 * increased (user space view).
81a44c5441d7f7 kernel/sched/core.c Thomas Gleixner 2014-02-07 7114 */
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7115 if (oldprio < p->prio)
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7116 queue_flags |= ENQUEUE_HEAD;
1de64443d755f8 kernel/sched/core.c Peter Zijlstra 2015-09-30 7117
ff77e468535987 kernel/sched/core.c Peter Zijlstra 2016-01-18 7118 enqueue_task(rq, p, queue_flags);
81a44c5441d7f7 kernel/sched/core.c Thomas Gleixner 2014-02-07 7119 }
a399d233078edb kernel/sched/core.c Vincent Guittot 2016-09-12 7120 if (running)
03b7fad167efca kernel/sched/core.c Peter Zijlstra 2019-05-29 7121 set_next_task(rq, p);
cb46984504048d kernel/sched.c Steven Rostedt 2008-01-25 7122
da7a735e51f962 kernel/sched.c Peter Zijlstra 2011-01-17 7123 check_class_changed(rq, p, prev_class, oldprio);
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7124
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7125 /* Avoid rq from going away on us: */
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7126 preempt_disable();
565790d28b1e33 kernel/sched/core.c Peter Zijlstra 2020-05-11 7127 head = splice_balance_callbacks(rq);
eb58075149b7f0 kernel/sched/core.c Peter Zijlstra 2015-07-31 7128 task_rq_unlock(rq, p, &rf);
b29739f902ee76 kernel/sched.c Ingo Molnar 2006-06-27 7129
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7130 if (pi) {
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7131 cpuset_read_unlock();
95e02ca9bb5324 kernel/sched.c Thomas Gleixner 2006-06-27 7132 rt_mutex_adjust_pi(p);
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7133 }
95e02ca9bb5324 kernel/sched.c Thomas Gleixner 2006-06-27 7134
d1ccc66df8bfe3 kernel/sched/core.c Ingo Molnar 2017-02-01 7135 /* Run balance callbacks after we've adjusted the PI chain: */
565790d28b1e33 kernel/sched/core.c Peter Zijlstra 2020-05-11 7136 balance_callbacks(rq, head);
4c9a4bc89a9cca kernel/sched/core.c Peter Zijlstra 2015-06-11 7137 preempt_enable();
4c9a4bc89a9cca kernel/sched/core.c Peter Zijlstra 2015-06-11 7138
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7139 return 0;
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7140
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7141 unlock:
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7142 task_rq_unlock(rq, p, &rf);
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7143 if (pi)
710da3c8ea7dfb kernel/sched/core.c Juri Lelli 2019-07-19 7144 cpuset_read_unlock();
4b211f2b129dd1 kernel/sched/core.c Mathieu Poirier 2019-07-19 7145 return retval;
^1da177e4c3f41 kernel/sched.c Linus Torvalds 2005-04-16 7146 }
961ccddd59d627 kernel/sched.c Rusty Russell 2008-06-23 7147
:::::: The code at line 7082 was first introduced by commit
:::::: dbc7f069b93a249340e974d6e8f55656280d8701 sched: Use replace normalize_task() with __sched_setscheduler()
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 237/364] arch/x86/include/asm/thread_info.h:224:7: error: implicit declaration of function 'current_thread_info'; did you mean 'current_real_cred'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: ae74b8bd2e5fd9dbe3177aaf3080799272becb8d [237/364] sched/headers, x86/compat: Simplify <asm/compat.h>
config: x86_64-rhel-8.3 (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=ae...
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 ae74b8bd2e5fd9dbe3177aaf3080799272becb8d
# save the attached .config to linux build tree
make W=1 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 >>):
In file included from include/linux/radix-tree.h:16,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/cdev.h:5,
from drivers/gpio/gpiolib-cdev.c:7:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/thread_info.h:50,
from include/linux/uio.h:9,
from include/linux/socket.h:8,
from include/linux/compat.h:15,
from drivers/gpio/gpiolib-cdev.c:8:
drivers/gpio/gpiolib-cdev.c: In function 'lineevent_read':
>> arch/x86/include/asm/thread_info.h:224:7: error: implicit declaration of function 'current_thread_info'; did you mean 'current_real_cred'? [-Werror=implicit-function-declaration]
224 | current_thread_info()->status & TS_COMPAT)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/compat.h:175:43: note: in expansion of macro 'in_ia32_syscall'
175 | #define compat_need_64bit_alignment_fixup in_ia32_syscall
| ^~~~~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c:1533:6: note: in expansion of macro 'compat_need_64bit_alignment_fixup'
1533 | if (compat_need_64bit_alignment_fixup())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/include/asm/thread_info.h:224:28: error: invalid type argument of '->' (have 'int')
224 | current_thread_info()->status & TS_COMPAT)
| ^~
arch/x86/include/asm/compat.h:175:43: note: in expansion of macro 'in_ia32_syscall'
175 | #define compat_need_64bit_alignment_fixup in_ia32_syscall
| ^~~~~~~~~~~~~~~
drivers/gpio/gpiolib-cdev.c:1533:6: note: in expansion of macro 'compat_need_64bit_alignment_fixup'
1533 | if (compat_need_64bit_alignment_fixup())
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/compat.h:19,
from drivers/gpio/gpiolib-cdev.c:8:
drivers/gpio/gpiolib-cdev.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +224 arch/x86/include/asm/thread_info.h
ef334a20d84f52 Srikar Dronamraju 2012-03-13 219
ef334a20d84f52 Srikar Dronamraju 2012-03-13 220 #ifdef CONFIG_X86_32
b9d989c7218ac9 Andy Lutomirski 2016-09-13 221 #define in_ia32_syscall() true
b9d989c7218ac9 Andy Lutomirski 2016-09-13 222 #else
b9d989c7218ac9 Andy Lutomirski 2016-09-13 223 #define in_ia32_syscall() (IS_ENABLED(CONFIG_IA32_EMULATION) && \
37a8f7c38339b2 Andy Lutomirski 2018-01-28 @224 current_thread_info()->status & TS_COMPAT)
ef334a20d84f52 Srikar Dronamraju 2012-03-13 225 #endif
1daeaa315164c6 Brian Gerst 2015-03-21 226
:::::: The code at line 224 was first introduced by commit
:::::: 37a8f7c38339b22b69876d6f5a0ab851565284e3 x86/asm: Move 'status' from thread_struct to thread_info
:::::: TO: Andy Lutomirski <luto(a)kernel.org>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 117/364] kernel/torture.c:541:3: error: implicit declaration of function 'set_cpus_allowed_ptr'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: e124b87bf88e97965935e8fa0fd3f9fbf2cd39b2 [117/364] sched/headers: Move CPU affinity APIs from <linux/sched.h> to <linux/sched/affinity.h>
config: x86_64-rhel-8.3 (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=e1...
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 e124b87bf88e97965935e8fa0fd3f9fbf2cd39b2
# save the attached .config to linux build tree
make W=1 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 >>):
kernel/torture.c: In function 'torture_shuffle_tasks':
>> kernel/torture.c:541:3: error: implicit declaration of function 'set_cpus_allowed_ptr' [-Werror=implicit-function-declaration]
541 | set_cpus_allowed_ptr(stp->st_t, shuffle_tmp_mask);
| ^~~~~~~~~~~~~~~~~~~~
kernel/torture.c: In function 'stutter_wait':
kernel/torture.c:728:2: error: implicit declaration of function 'cond_resched_tasks_rcu_qs' [-Werror=implicit-function-declaration]
728 | cond_resched_tasks_rcu_qs();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/torture.c:741:5: error: implicit declaration of function 'cond_resched'; did you mean 'need_resched'? [-Werror=implicit-function-declaration]
741 | cond_resched();
| ^~~~~~~~~~~~
| need_resched
cc1: some warnings being treated as errors
--
mm/page_alloc.c: In function 'deferred_init_memmap':
>> mm/page_alloc.c:1981:3: error: implicit declaration of function 'set_cpus_allowed_ptr'; did you mean 'set_mems_allowed'? [-Werror=implicit-function-declaration]
1981 | set_cpus_allowed_ptr(current, cpumask);
| ^~~~~~~~~~~~~~~~~~~~
| set_mems_allowed
mm/page_alloc.c: At top level:
mm/page_alloc.c:3652:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3652 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/set_cpus_allowed_ptr +541 kernel/torture.c
3808dc9fab0591 Paul E. McKenney 2014-01-28 514
3808dc9fab0591 Paul E. McKenney 2014-01-28 515 /* Shuffle tasks such that we allow shuffle_idle_cpu to become idle.
3808dc9fab0591 Paul E. McKenney 2014-01-28 516 * A special case is when shuffle_idle_cpu = -1, in which case we allow
3808dc9fab0591 Paul E. McKenney 2014-01-28 517 * the tasks to run on all CPUs.
3808dc9fab0591 Paul E. McKenney 2014-01-28 518 */
3808dc9fab0591 Paul E. McKenney 2014-01-28 519 static void torture_shuffle_tasks(void)
3808dc9fab0591 Paul E. McKenney 2014-01-28 520 {
3808dc9fab0591 Paul E. McKenney 2014-01-28 521 struct shuffle_task *stp;
3808dc9fab0591 Paul E. McKenney 2014-01-28 522
3808dc9fab0591 Paul E. McKenney 2014-01-28 523 cpumask_setall(shuffle_tmp_mask);
3808dc9fab0591 Paul E. McKenney 2014-01-28 524 get_online_cpus();
3808dc9fab0591 Paul E. McKenney 2014-01-28 525
3808dc9fab0591 Paul E. McKenney 2014-01-28 526 /* No point in shuffling if there is only one online CPU (ex: UP) */
3808dc9fab0591 Paul E. McKenney 2014-01-28 527 if (num_online_cpus() == 1) {
3808dc9fab0591 Paul E. McKenney 2014-01-28 528 put_online_cpus();
3808dc9fab0591 Paul E. McKenney 2014-01-28 529 return;
3808dc9fab0591 Paul E. McKenney 2014-01-28 530 }
3808dc9fab0591 Paul E. McKenney 2014-01-28 531
3808dc9fab0591 Paul E. McKenney 2014-01-28 532 /* Advance to the next CPU. Upon overflow, don't idle any CPUs. */
3808dc9fab0591 Paul E. McKenney 2014-01-28 533 shuffle_idle_cpu = cpumask_next(shuffle_idle_cpu, shuffle_tmp_mask);
3808dc9fab0591 Paul E. McKenney 2014-01-28 534 if (shuffle_idle_cpu >= nr_cpu_ids)
3808dc9fab0591 Paul E. McKenney 2014-01-28 535 shuffle_idle_cpu = -1;
5ed63b199c5b58 Iulia Manda 2014-03-17 536 else
3808dc9fab0591 Paul E. McKenney 2014-01-28 537 cpumask_clear_cpu(shuffle_idle_cpu, shuffle_tmp_mask);
3808dc9fab0591 Paul E. McKenney 2014-01-28 538
3808dc9fab0591 Paul E. McKenney 2014-01-28 539 mutex_lock(&shuffle_task_mutex);
3808dc9fab0591 Paul E. McKenney 2014-01-28 540 list_for_each_entry(stp, &shuffle_task_list, st_l)
3808dc9fab0591 Paul E. McKenney 2014-01-28 @541 set_cpus_allowed_ptr(stp->st_t, shuffle_tmp_mask);
3808dc9fab0591 Paul E. McKenney 2014-01-28 542 mutex_unlock(&shuffle_task_mutex);
3808dc9fab0591 Paul E. McKenney 2014-01-28 543
3808dc9fab0591 Paul E. McKenney 2014-01-28 544 put_online_cpus();
3808dc9fab0591 Paul E. McKenney 2014-01-28 545 }
3808dc9fab0591 Paul E. McKenney 2014-01-28 546
:::::: The code at line 541 was first introduced by commit
:::::: 3808dc9fab05913060626d7f0edd0f195cb9dcab rcutorture: Abstract torture_shuffle()
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/xen/swiotlb-xen.c:315 xen_swiotlb_alloc_coherent() error: we previously assumed 'hwdev' could be null (see line 308)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 43cb5d49a99b3ecd9fef9826899aac948c3048da
commit: 7bc5c428a660d4d1bc95ba54bf4cb6bccf8c3029 dma-direct: remove __dma_to_phys
config: x86_64-randconfig-m001-20210612 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/xen/swiotlb-xen.c:315 xen_swiotlb_alloc_coherent() error: we previously assumed 'hwdev' could be null (see line 308)
vim +/hwdev +315 drivers/xen/swiotlb-xen.c
dceb1a6819ab2c Christoph Hellwig 2017-05-21 276 static void *
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 277 xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
baa676fcf8d555 Andrzej Pietrasiewicz 2012-03-27 278 dma_addr_t *dma_handle, gfp_t flags,
00085f1efa387a Krzysztof Kozlowski 2016-08-03 279 unsigned long attrs)
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 280 {
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 281 void *ret;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 282 int order = get_order(size);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 283 u64 dma_mask = DMA_BIT_MASK(32);
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 284 phys_addr_t phys;
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 285 dma_addr_t dev_addr;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 286
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 287 /*
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 288 * Ignore region specifiers - the kernel's ideas of
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 289 * pseudo-phys memory layout has nothing to do with the
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 290 * machine physical layout. We can't allocate highmem
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 291 * because we can't return a pointer to it.
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 292 */
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 293 flags &= ~(__GFP_DMA | __GFP_HIGHMEM);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 294
7250f422da0480 Joe Jin 2018-10-16 295 /* Convert the size to actually allocated. */
7250f422da0480 Joe Jin 2018-10-16 296 size = 1UL << (order + XEN_PAGE_SHIFT);
7250f422da0480 Joe Jin 2018-10-16 297
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 298 /* On ARM this function returns an ioremap'ped virtual address for
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 299 * which virt_to_phys doesn't return the corresponding physical
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 300 * address. In fact on ARM virt_to_phys only works for kernel direct
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 301 * mapped RAM memory. Also see comment below.
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 302 */
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 303 ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 304
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 305 if (!ret)
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 306 return ret;
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 307
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 @308 if (hwdev && hwdev->coherent_dma_mask)
^^^^^
Hopefully this check can be removed.
038d07a283d623 Christoph Hellwig 2018-03-19 309 dma_mask = hwdev->coherent_dma_mask;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 310
91ffe4ad534ab2 Stefano Stabellini 2020-07-10 311 /* At this point dma_handle is the dma address, next we are
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 312 * going to set it to the machine address.
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 313 * Do not use virt_to_phys(ret) because on ARM it doesn't correspond
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 314 * to *dma_handle. */
91ffe4ad534ab2 Stefano Stabellini 2020-07-10 @315 phys = dma_to_phys(hwdev, *dma_handle);
^^^^^
dma_to_phys() does not check.
91ffe4ad534ab2 Stefano Stabellini 2020-07-10 316 dev_addr = xen_phys_to_dma(hwdev, phys);
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 317 if (((dev_addr + size - 1 <= dma_mask)) &&
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 318 !range_straddles_page_boundary(phys, size))
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 319 *dma_handle = dev_addr;
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 320 else {
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 321 if (xen_create_contiguous_region(phys, order,
69908907b02efe Stefano Stabellini 2013-10-09 322 fls64(dma_mask), dma_handle) != 0) {
1b65c4e5a9af1a Stefano Stabellini 2013-10-10 323 xen_free_coherent_pages(hwdev, size, ret, (dma_addr_t)phys, attrs);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 324 return NULL;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 325 }
91ffe4ad534ab2 Stefano Stabellini 2020-07-10 326 *dma_handle = phys_to_dma(hwdev, *dma_handle);
b877ac9815a8fe Juergen Gross 2019-06-14 327 SetPageXenRemapped(virt_to_page(ret));
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 328 }
6810df88dcfc22 Konrad Rzeszutek Wilk 2011-08-25 329 memset(ret, 0, size);
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 330 return ret;
b097186fd29d5b Konrad Rzeszutek Wilk 2010-05-11 331 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 7012/7430] include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index()
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ccc252d2e818f6a479441119ad453c3ce7c7c461
commit: a7ba988ff9de37f0961b4bf96d17aca73d0d2e25 [7012/7430] mm, slub: change run-time assertion in kmalloc_index() to compile-time
config: parisc-randconfig-r014-20210604 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout a7ba988ff9de37f0961b4bf96d17aca73d0d2e25
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
In file included from <command-line>:
In function 'kmalloc_index',
inlined from 'kmalloc_node' at include/linux/slab.h:572:20,
inlined from 'bpf_map_kmalloc_node.isra.0.part.0' at include/linux/bpf.h:1319:9:
>> include/linux/compiler_types.h:328:38: error: call to '__compiletime_assert_183' declared with attribute error: unexpected size in kmalloc_index()
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:309:4: note: in definition of macro '__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/slab.h:389:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
389 | BUILD_BUG_ON_MSG(1, "unexpected size in kmalloc_index()");
| ^~~~~~~~~~~~~~~~
vim +/__compiletime_assert_183 +328 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 326 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @328 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 329
:::::: The code at line 328 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 100/364] kernel/torture.c:741:5: error: implicit declaration of function 'cond_resched'; did you mean 'need_resched'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 54617112331a4cc28268a4321eab5b38baba4d9f [100/364] sched/headers: Remove <linux/sched/cond_resched.h> inclusion from <linux/sched.h>
config: x86_64-rhel-8.3 (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=54...
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 54617112331a4cc28268a4321eab5b38baba4d9f
# save the attached .config to linux build tree
make W=1 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 >>):
kernel/torture.c: In function 'stutter_wait':
>> kernel/torture.c:728:2: error: implicit declaration of function 'cond_resched_tasks_rcu_qs' [-Werror=implicit-function-declaration]
728 | cond_resched_tasks_rcu_qs();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/torture.c:741:5: error: implicit declaration of function 'cond_resched'; did you mean 'need_resched'? [-Werror=implicit-function-declaration]
741 | cond_resched();
| ^~~~~~~~~~~~
| need_resched
cc1: some warnings being treated as errors
vim +741 kernel/torture.c
628edaa5062282 Paul E. McKenney 2014-01-31 717
628edaa5062282 Paul E. McKenney 2014-01-31 718 /*
628edaa5062282 Paul E. McKenney 2014-01-31 719 * Block until the stutter interval ends. This must be called periodically
628edaa5062282 Paul E. McKenney 2014-01-31 720 * by all running kthreads that need to be subject to stuttering.
628edaa5062282 Paul E. McKenney 2014-01-31 721 */
474e59b476b339 Paul E. McKenney 2018-08-07 722 bool stutter_wait(const char *title)
628edaa5062282 Paul E. McKenney 2014-01-31 723 {
19012b786ecccb Paul E. McKenney 2020-09-01 724 unsigned int i = 0;
e8516c64fe97e2 Paul E. McKenney 2019-04-09 725 bool ret = false;
19012b786ecccb Paul E. McKenney 2020-09-01 726 int spt;
4ced3314fd3a73 Paul E. McKenney 2017-11-21 727
cee43939893337 Paul E. McKenney 2018-03-02 @728 cond_resched_tasks_rcu_qs();
4ced3314fd3a73 Paul E. McKenney 2017-11-21 729 spt = READ_ONCE(stutter_pause_test);
29d3939084583b Paul E. McKenney 2017-11-21 730 for (; spt; spt = READ_ONCE(stutter_pause_test)) {
ab1b7880dec86b Paul E. McKenney 2020-09-22 731 if (!ret) {
ab1b7880dec86b Paul E. McKenney 2020-09-22 732 sched_set_normal(current, MAX_NICE);
e8516c64fe97e2 Paul E. McKenney 2019-04-09 733 ret = true;
ab1b7880dec86b Paul E. McKenney 2020-09-22 734 }
4ced3314fd3a73 Paul E. McKenney 2017-11-21 735 if (spt == 1) {
628edaa5062282 Paul E. McKenney 2014-01-31 736 schedule_timeout_interruptible(1);
4ced3314fd3a73 Paul E. McKenney 2017-11-21 737 } else if (spt == 2) {
19012b786ecccb Paul E. McKenney 2020-09-01 738 while (READ_ONCE(stutter_pause_test)) {
ed24affa71f7ab Paul E. McKenney 2020-11-17 739 if (!(i++ & 0xffff))
ed24affa71f7ab Paul E. McKenney 2020-11-17 740 torture_hrtimeout_us(10, 0, NULL);
ab7d45053f99f4 Paul E. McKenney 2014-03-04 @741 cond_resched();
19012b786ecccb Paul E. McKenney 2020-09-01 742 }
4ced3314fd3a73 Paul E. McKenney 2017-11-21 743 } else {
628edaa5062282 Paul E. McKenney 2014-01-31 744 schedule_timeout_interruptible(round_jiffies_relative(HZ));
4ced3314fd3a73 Paul E. McKenney 2017-11-21 745 }
628edaa5062282 Paul E. McKenney 2014-01-31 746 torture_shutdown_absorb(title);
628edaa5062282 Paul E. McKenney 2014-01-31 747 }
e8516c64fe97e2 Paul E. McKenney 2019-04-09 748 return ret;
628edaa5062282 Paul E. McKenney 2014-01-31 749 }
628edaa5062282 Paul E. McKenney 2014-01-31 750 EXPORT_SYMBOL_GPL(stutter_wait);
628edaa5062282 Paul E. McKenney 2014-01-31 751
:::::: The code at line 741 was first introduced by commit
:::::: ab7d45053f99f44f81a221eb5c9fbe253ee94524 torture: Increase stutter-end intensity
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 318/364] include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 49f47f35436a241df45c13d01c04e19bc5f18799 [318/364] sched/headers, security: Simplify <linux/security.h>
config: x86_64-kexec (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=49...
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 49f47f35436a241df45c13d01c04e19bc5f18799
# save the attached .config to linux build tree
make W=1 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 >>):
In file included from net/core/rtnetlink.c:33:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from include/linux/net.h:23,
from net/core/rtnetlink.c:25:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/workqueue.h:16,
from include/linux/srcu_types.h:20,
from include/linux/srcu.h:19,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:8,
from include/linux/slab.h:15,
from fs/nfsd/nfsctl.c:8:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/fs_context.h:14,
from fs/nfsd/nfsctl.c:11:
include/linux/security.h: At top level:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:12,
from include/linux/sunrpc/types.h:14,
from include/linux/sunrpc/svc.h:16,
from include/linux/sunrpc/svcsock.h:13,
from fs/nfsd/nfsctl.c:13:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/xarray.h:16,
from include/linux/fs.h:12,
from fs/sysfs/symlink.c:12:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from fs/sysfs/symlink.c:16:
include/linux/security.h: At top level:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
--
In file included from include/linux/workqueue.h:16,
from include/linux/srcu_types.h:20,
from include/linux/srcu.h:19,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from include/linux/pagemap.h:8,
from drivers/dax/super.c:5:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/fs_context.h:14,
from include/linux/pseudo_fs.h:4,
from drivers/dax/super.c:8:
include/linux/security.h: At top level:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
drivers/dax/super.c:453:6: warning: no previous prototype for 'run_dax' [-Wmissing-prototypes]
453 | void run_dax(struct dax_device *dax_dev)
| ^~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from include/linux/pagemap.h:8,
from drivers/dax/super.c:5:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/workqueue.h:16,
from include/linux/srcu_types.h:20,
from include/linux/srcu.h:19,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/swap.h:7,
from include/linux/suspend.h:5,
from kernel/power/hibernate.c:15:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from kernel/power/hibernate.c:33:
include/linux/security.h: At top level:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
kernel/power/hibernate.c:272:12: warning: no previous prototype for 'arch_resume_nosmt' [-Wmissing-prototypes]
272 | __weak int arch_resume_nosmt(void)
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from include/linux/pagemap.h:8,
from include/linux/swap.h:11,
from include/linux/suspend.h:5,
from kernel/power/hibernate.c:15:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/kernel/ioport.c:7:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/xarray.h:16,
from include/linux/fs.h:12,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:76,
from arch/x86/kernel/ioport.c:8:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from include/linux/ring_buffer.h:5,
from include/linux/trace_events.h:6,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:88,
from arch/x86/kernel/ioport.c:8:
arch/x86/kernel/ioport.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from kernel/header_test_security.h.c:1:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
--
In file included from kernel/uid16.c:15:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/workqueue.h:16,
from include/linux/srcu_types.h:20,
from include/linux/srcu.h:19,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:8,
from include/linux/mm.h:12,
from kernel/uid16.c:7:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from kernel/uid16.c:7:
kernel/uid16.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/fs_context.h:14,
from fs/cifs/fs_context.c:19:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/xarray.h:16,
from include/linux/fs.h:12,
from fs/cifs/fs_context.c:21:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from include/linux/bvec.h:14,
from include/linux/skbuff.h:19,
from include/net/net_namespace.h:39,
from include/linux/netdevice.h:39,
from include/net/sock.h:48,
from fs/cifs/cifspdu.h:25,
from fs/cifs/fs_context.c:26:
fs/cifs/fs_context.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace_kprobe.c:10:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
In file included from include/linux/rculist.h:11,
from kernel/trace/trace_kprobe.c:13:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from kernel/trace/trace_kprobe.c:12:
kernel/trace/trace_kprobe.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/ftrace.c:22:
>> include/linux/security.h:1872:43: error: unknown type name 'key_ref_t'
1872 | static inline int security_key_permission(key_ref_t key_ref,
| ^~~~~~~~~
kernel/trace/ftrace.c:303:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
303 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:346:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
346 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:3877:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
3877 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from kernel/trace/ftrace.c:19:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
..
vim +/key_ref_t +1872 include/linux/security.h
29db9190634067 David Howells 2005-10-30 1871
29db9190634067 David Howells 2005-10-30 @1872 static inline int security_key_permission(key_ref_t key_ref,
d84f4f992cbd76 David Howells 2008-11-14 1873 const struct cred *cred,
8c0637e950d689 David Howells 2020-05-12 1874 enum key_need_perm need_perm)
29db9190634067 David Howells 2005-10-30 1875 {
29db9190634067 David Howells 2005-10-30 1876 return 0;
29db9190634067 David Howells 2005-10-30 1877 }
29db9190634067 David Howells 2005-10-30 1878
:::::: The code at line 1872 was first introduced by commit
:::::: 29db9190634067c5a328ee5fcc2890251b836b4b [PATCH] Keys: Add LSM hooks for key management [try #3]
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 291/364] lib/test_sysctl.c:74:25: error: array type has incomplete element type 'struct ctl_table'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 6601f8679da18dd112f11e39486b163d4ad976e2 [291/364] sched/headers, fs: Simplify <linux/fs.h> header dependencies
config: x86_64-kexec (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=66...
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 6601f8679da18dd112f11e39486b163d4ad976e2
# save the attached .config to linux build tree
make W=1 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 >>):
In file included from include/linux/xarray.h:16,
from include/linux/fs.h:12,
from lib/test_sysctl.c:31:
include/linux/rcuwait.h: In function 'rcuwait_active':
include/linux/rcupdate.h:364:9: error: dereferencing pointer to incomplete type 'struct task_struct'
364 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:474:31: note: in expansion of macro '__rcu_access_pointer'
474 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/rcuwait.h:33:11: note: in expansion of macro 'rcu_access_pointer'
33 | return !!rcu_access_pointer(w->task);
| ^~~~~~~~~~~~~~~~~~
lib/test_sysctl.c: At top level:
>> lib/test_sysctl.c:74:25: error: array type has incomplete element type 'struct ctl_table'
74 | static struct ctl_table test_table[] = {
| ^~~~~~~~~~
>> lib/test_sysctl.c:76:3: error: field name not in record or union initializer
76 | .procname = "int_0001",
| ^
lib/test_sysctl.c:76:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:77:3: error: field name not in record or union initializer
77 | .data = &test_data.int_0001,
| ^
lib/test_sysctl.c:77:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:78:3: error: field name not in record or union initializer
78 | .maxlen = sizeof(int),
| ^
lib/test_sysctl.c:78:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:79:3: error: field name not in record or union initializer
79 | .mode = 0644,
| ^
lib/test_sysctl.c:79:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:80:3: error: field name not in record or union initializer
80 | .proc_handler = proc_dointvec_minmax,
| ^
lib/test_sysctl.c:80:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:80:19: error: 'proc_dointvec_minmax' undeclared here (not in a function)
80 | .proc_handler = proc_dointvec_minmax,
| ^~~~~~~~~~~~~~~~~~~~
lib/test_sysctl.c:81:3: error: field name not in record or union initializer
81 | .extra1 = &i_zero,
| ^
lib/test_sysctl.c:81:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:82:3: error: field name not in record or union initializer
82 | .extra2 = &i_one_hundred,
| ^
lib/test_sysctl.c:82:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:85:3: error: field name not in record or union initializer
85 | .procname = "int_0002",
| ^
lib/test_sysctl.c:85:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:86:3: error: field name not in record or union initializer
86 | .data = &test_data.int_0002,
| ^
lib/test_sysctl.c:86:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:87:3: error: field name not in record or union initializer
87 | .maxlen = sizeof(int),
| ^
lib/test_sysctl.c:87:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:88:3: error: field name not in record or union initializer
88 | .mode = 0644,
| ^
lib/test_sysctl.c:88:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:89:3: error: field name not in record or union initializer
89 | .proc_handler = proc_dointvec,
| ^
lib/test_sysctl.c:89:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:89:19: error: 'proc_dointvec' undeclared here (not in a function)
89 | .proc_handler = proc_dointvec,
| ^~~~~~~~~~~~~
lib/test_sysctl.c:92:3: error: field name not in record or union initializer
92 | .procname = "int_0003",
| ^
lib/test_sysctl.c:92:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:93:3: error: field name not in record or union initializer
93 | .data = &test_data.int_0003,
| ^
lib/test_sysctl.c:93:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:94:3: error: field name not in record or union initializer
94 | .maxlen = sizeof(test_data.int_0003),
| ^
lib/test_sysctl.c:94:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:95:3: error: field name not in record or union initializer
95 | .mode = 0644,
| ^
lib/test_sysctl.c:95:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:96:3: error: field name not in record or union initializer
96 | .proc_handler = proc_dointvec,
| ^
lib/test_sysctl.c:96:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:99:3: error: field name not in record or union initializer
99 | .procname = "boot_int",
| ^
lib/test_sysctl.c:99:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:100:3: error: field name not in record or union initializer
100 | .data = &test_data.boot_int,
| ^
lib/test_sysctl.c:100:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:101:3: error: field name not in record or union initializer
101 | .maxlen = sizeof(test_data.boot_int),
| ^
lib/test_sysctl.c:101:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:102:3: error: field name not in record or union initializer
102 | .mode = 0644,
| ^
lib/test_sysctl.c:102:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:103:3: error: field name not in record or union initializer
103 | .proc_handler = proc_dointvec,
| ^
lib/test_sysctl.c:103:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:104:3: error: field name not in record or union initializer
104 | .extra1 = SYSCTL_ZERO,
| ^
lib/test_sysctl.c:104:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:104:14: error: 'SYSCTL_ZERO' undeclared here (not in a function)
104 | .extra1 = SYSCTL_ZERO,
| ^~~~~~~~~~~
lib/test_sysctl.c:105:3: error: field name not in record or union initializer
105 | .extra2 = SYSCTL_ONE,
| ^
lib/test_sysctl.c:105:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:105:21: error: 'SYSCTL_ONE' undeclared here (not in a function)
105 | .extra2 = SYSCTL_ONE,
| ^~~~~~~~~~
lib/test_sysctl.c:108:3: error: field name not in record or union initializer
108 | .procname = "uint_0001",
| ^
lib/test_sysctl.c:108:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:109:3: error: field name not in record or union initializer
109 | .data = &test_data.uint_0001,
| ^
lib/test_sysctl.c:109:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:110:3: error: field name not in record or union initializer
110 | .maxlen = sizeof(unsigned int),
| ^
lib/test_sysctl.c:110:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:111:3: error: field name not in record or union initializer
111 | .mode = 0644,
| ^
lib/test_sysctl.c:111:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:112:3: error: field name not in record or union initializer
112 | .proc_handler = proc_douintvec,
| ^
lib/test_sysctl.c:112:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:112:19: error: 'proc_douintvec' undeclared here (not in a function)
112 | .proc_handler = proc_douintvec,
| ^~~~~~~~~~~~~~
lib/test_sysctl.c:115:3: error: field name not in record or union initializer
115 | .procname = "string_0001",
| ^
lib/test_sysctl.c:115:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:116:3: error: field name not in record or union initializer
116 | .data = &test_data.string_0001,
| ^
lib/test_sysctl.c:116:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:117:3: error: field name not in record or union initializer
117 | .maxlen = sizeof(test_data.string_0001),
| ^
lib/test_sysctl.c:117:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:118:3: error: field name not in record or union initializer
118 | .mode = 0644,
| ^
lib/test_sysctl.c:118:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:119:3: error: field name not in record or union initializer
119 | .proc_handler = proc_dostring,
| ^
lib/test_sysctl.c:119:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:119:19: error: 'proc_dostring' undeclared here (not in a function)
119 | .proc_handler = proc_dostring,
| ^~~~~~~~~~~~~
lib/test_sysctl.c:122:3: error: field name not in record or union initializer
122 | .procname = "bitmap_0001",
| ^
lib/test_sysctl.c:122:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:123:3: error: field name not in record or union initializer
123 | .data = &test_data.bitmap_0001,
| ^
lib/test_sysctl.c:123:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:124:3: error: field name not in record or union initializer
124 | .maxlen = SYSCTL_TEST_BITMAP_SIZE,
| ^
lib/test_sysctl.c:124:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:125:3: error: field name not in record or union initializer
125 | .mode = 0644,
| ^
lib/test_sysctl.c:125:3: note: (near initialization for 'test_table')
lib/test_sysctl.c:126:3: error: field name not in record or union initializer
126 | .proc_handler = proc_do_large_bitmap,
| ^
lib/test_sysctl.c:126:3: note: (near initialization for 'test_table')
>> lib/test_sysctl.c:126:19: error: 'proc_do_large_bitmap' undeclared here (not in a function)
126 | .proc_handler = proc_do_large_bitmap,
| ^~~~~~~~~~~~~~~~~~~~
lib/test_sysctl.c:131:25: error: array type has incomplete element type 'struct ctl_table'
131 | static struct ctl_table test_sysctl_table[] = {
| ^~~~~~~~~~~~~~~~~
lib/test_sysctl.c:133:3: error: field name not in record or union initializer
133 | .procname = "test_sysctl",
| ^
lib/test_sysctl.c:133:3: note: (near initialization for 'test_sysctl_table')
lib/test_sysctl.c:134:3: error: field name not in record or union initializer
134 | .maxlen = 0,
| ^
lib/test_sysctl.c:134:3: note: (near initialization for 'test_sysctl_table')
lib/test_sysctl.c:135:3: error: field name not in record or union initializer
135 | .mode = 0555,
| ^
lib/test_sysctl.c:135:3: note: (near initialization for 'test_sysctl_table')
lib/test_sysctl.c:136:3: error: field name not in record or union initializer
136 | .child = test_table,
| ^
lib/test_sysctl.c:136:3: note: (near initialization for 'test_sysctl_table')
lib/test_sysctl.c:141:25: error: array type has incomplete element type 'struct ctl_table'
141 | static struct ctl_table test_sysctl_root_table[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
lib/test_sysctl.c:143:3: error: field name not in record or union initializer
143 | .procname = "debug",
| ^
lib/test_sysctl.c:143:3: note: (near initialization for 'test_sysctl_root_table')
lib/test_sysctl.c:144:3: error: field name not in record or union initializer
144 | .maxlen = 0,
| ^
lib/test_sysctl.c:144:3: note: (near initialization for 'test_sysctl_root_table')
lib/test_sysctl.c:145:3: error: field name not in record or union initializer
145 | .mode = 0555,
| ^
lib/test_sysctl.c:145:3: note: (near initialization for 'test_sysctl_root_table')
lib/test_sysctl.c:146:3: error: field name not in record or union initializer
146 | .child = test_sysctl_table,
| ^
lib/test_sysctl.c:146:3: note: (near initialization for 'test_sysctl_root_table')
lib/test_sysctl.c: In function 'test_sysctl_init':
>> lib/test_sysctl.c:158:23: error: implicit declaration of function 'register_sysctl_table' [-Werror=implicit-function-declaration]
158 | test_sysctl_header = register_sysctl_table(test_sysctl_root_table);
| ^~~~~~~~~~~~~~~~~~~~~
lib/test_sysctl.c: In function 'test_sysctl_exit':
>> lib/test_sysctl.c:171:3: error: implicit declaration of function 'unregister_sysctl_table' [-Werror=implicit-function-declaration]
171 | unregister_sysctl_table(test_sysctl_header);
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:11,
from lib/test_sysctl.c:34:
lib/test_sysctl.c: At top level:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
lib/test_sysctl.c:141:25: warning: 'test_sysctl_root_table' defined but not used [-Wunused-variable]
141 | static struct ctl_table test_sysctl_root_table[] = {
| ^~~~~~~~~~~~~~~~~~~~~~
lib/test_sysctl.c:131:25: warning: 'test_sysctl_table' defined but not used [-Wunused-variable]
131 | static struct ctl_table test_sysctl_table[] = {
| ^~~~~~~~~~~~~~~~~
lib/test_sysctl.c:74:25: warning: 'test_table' defined but not used [-Wunused-variable]
74 | static struct ctl_table test_table[] = {
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +74 lib/test_sysctl.c
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 72
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 73 /* These are all under /proc/sys/debug/test_sysctl/ */
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @74 static struct ctl_table test_table[] = {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 75 {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @76 .procname = "int_0001",
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 77 .data = &test_data.int_0001,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 78 .maxlen = sizeof(int),
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 79 .mode = 0644,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @80 .proc_handler = proc_dointvec_minmax,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 81 .extra1 = &i_zero,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 82 .extra2 = &i_one_hundred,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 83 },
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 84 {
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 85 .procname = "int_0002",
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 86 .data = &test_data.int_0002,
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 87 .maxlen = sizeof(int),
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 88 .mode = 0644,
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 @89 .proc_handler = proc_dointvec,
eb965eda1cabf2 Luis R. Rodriguez 2017-07-12 90 },
7c43a657a4bead Luis R. Rodriguez 2017-07-12 91 {
7c43a657a4bead Luis R. Rodriguez 2017-07-12 92 .procname = "int_0003",
7c43a657a4bead Luis R. Rodriguez 2017-07-12 93 .data = &test_data.int_0003,
7c43a657a4bead Luis R. Rodriguez 2017-07-12 94 .maxlen = sizeof(test_data.int_0003),
7c43a657a4bead Luis R. Rodriguez 2017-07-12 95 .mode = 0644,
7c43a657a4bead Luis R. Rodriguez 2017-07-12 96 .proc_handler = proc_dointvec,
7c43a657a4bead Luis R. Rodriguez 2017-07-12 97 },
4f2f682d89d83f Vlastimil Babka 2020-06-07 98 {
4f2f682d89d83f Vlastimil Babka 2020-06-07 99 .procname = "boot_int",
4f2f682d89d83f Vlastimil Babka 2020-06-07 100 .data = &test_data.boot_int,
4f2f682d89d83f Vlastimil Babka 2020-06-07 101 .maxlen = sizeof(test_data.boot_int),
4f2f682d89d83f Vlastimil Babka 2020-06-07 102 .mode = 0644,
4f2f682d89d83f Vlastimil Babka 2020-06-07 103 .proc_handler = proc_dointvec,
4f2f682d89d83f Vlastimil Babka 2020-06-07 @104 .extra1 = SYSCTL_ZERO,
4f2f682d89d83f Vlastimil Babka 2020-06-07 @105 .extra2 = SYSCTL_ONE,
4f2f682d89d83f Vlastimil Babka 2020-06-07 106 },
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 107 {
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 108 .procname = "uint_0001",
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 109 .data = &test_data.uint_0001,
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 110 .maxlen = sizeof(unsigned int),
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 111 .mode = 0644,
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 @112 .proc_handler = proc_douintvec,
2920fad3a5d394 Luis R. Rodriguez 2017-07-12 113 },
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 114 {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 115 .procname = "string_0001",
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 116 .data = &test_data.string_0001,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 117 .maxlen = sizeof(test_data.string_0001),
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 118 .mode = 0644,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @119 .proc_handler = proc_dostring,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 120 },
2ea622b887e744 Eric Sandeen 2019-05-14 121 {
2ea622b887e744 Eric Sandeen 2019-05-14 122 .procname = "bitmap_0001",
2ea622b887e744 Eric Sandeen 2019-05-14 123 .data = &test_data.bitmap_0001,
2ea622b887e744 Eric Sandeen 2019-05-14 124 .maxlen = SYSCTL_TEST_BITMAP_SIZE,
2ea622b887e744 Eric Sandeen 2019-05-14 125 .mode = 0644,
2ea622b887e744 Eric Sandeen 2019-05-14 @126 .proc_handler = proc_do_large_bitmap,
2ea622b887e744 Eric Sandeen 2019-05-14 127 },
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 128 { }
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 129 };
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 130
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 131 static struct ctl_table test_sysctl_table[] = {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 132 {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 133 .procname = "test_sysctl",
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 134 .maxlen = 0,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 135 .mode = 0555,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 136 .child = test_table,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 137 },
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 138 { }
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 139 };
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 140
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 141 static struct ctl_table test_sysctl_root_table[] = {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 142 {
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 143 .procname = "debug",
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 144 .maxlen = 0,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 145 .mode = 0555,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 146 .child = test_sysctl_table,
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 147 },
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 148 { }
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 149 };
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 150
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 151 static struct ctl_table_header *test_sysctl_header;
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 152
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 153 static int __init test_sysctl_init(void)
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 154 {
2ea622b887e744 Eric Sandeen 2019-05-14 155 test_data.bitmap_0001 = kzalloc(SYSCTL_TEST_BITMAP_SIZE/8, GFP_KERNEL);
2ea622b887e744 Eric Sandeen 2019-05-14 156 if (!test_data.bitmap_0001)
2ea622b887e744 Eric Sandeen 2019-05-14 157 return -ENOMEM;
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @158 test_sysctl_header = register_sysctl_table(test_sysctl_root_table);
2ea622b887e744 Eric Sandeen 2019-05-14 159 if (!test_sysctl_header) {
2ea622b887e744 Eric Sandeen 2019-05-14 160 kfree(test_data.bitmap_0001);
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 161 return -ENOMEM;
2ea622b887e744 Eric Sandeen 2019-05-14 162 }
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 163 return 0;
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 164 }
2f56f84511367c Masami Hiramatsu 2020-05-28 165 module_init(test_sysctl_init);
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 166
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 167 static void __exit test_sysctl_exit(void)
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 168 {
2ea622b887e744 Eric Sandeen 2019-05-14 169 kfree(test_data.bitmap_0001);
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 170 if (test_sysctl_header)
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 @171 unregister_sysctl_table(test_sysctl_header);
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 172 }
9308f2f9e7f055 Luis R. Rodriguez 2017-07-12 173
:::::: The code at line 74 was first introduced by commit
:::::: 9308f2f9e7f055cf3934645ec622bb5259dc1c14 test_sysctl: add dedicated proc sysctl test driver
:::::: TO: Luis R. Rodriguez <mcgrof(a)kernel.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 362/364] arch/x86/include/asm/uaccess_32.h:18:1: error: redefinition of 'raw_copy_to_user'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 9073ccabaa37f3392a6888678ffc6968fcdca9b6 [362/364] sched/headers: Misc dependency fixes
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=90...
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 9073ccabaa37f3392a6888678ffc6968fcdca9b6
# 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(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/uaccess.h:464,
from include/linux/uaccess.h:13,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from kernel/power/snapshot.c:19:
>> arch/x86/include/asm/uaccess_32.h:18:1: error: redefinition of 'raw_copy_to_user'
18 | raw_copy_to_user(void __user *to, const void *from, unsigned long n)
| ^~~~~~~~~~~~~~~~
In file included from kernel/power/snapshot.c:15:
arch/x86/include/asm/uaccess_64.h:56:1: note: previous definition of 'raw_copy_to_user' was here
56 | raw_copy_to_user(void __user *dst, const void *src, unsigned long size)
| ^~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/uaccess.h:464,
from include/linux/uaccess.h:13,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from kernel/power/snapshot.c:19:
>> arch/x86/include/asm/uaccess_32.h:24:1: error: redefinition of 'raw_copy_from_user'
24 | raw_copy_from_user(void *to, const void __user *from, unsigned long n)
| ^~~~~~~~~~~~~~~~~~
In file included from kernel/power/snapshot.c:15:
arch/x86/include/asm/uaccess_64.h:50:1: note: previous definition of 'raw_copy_from_user' was here
50 | raw_copy_from_user(void *dst, const void __user *src, unsigned long size)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/uaccess.h:464,
from include/linux/uaccess.h:13,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from kernel/power/snapshot.c:19:
>> arch/x86/include/asm/uaccess_32.h:30:1: error: conflicting types for '__copy_from_user_inatomic_nocache'
30 | __copy_from_user_inatomic_nocache(void *to, const void __user *from,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/power/snapshot.c:15:
arch/x86/include/asm/uaccess_64.h:76:1: note: previous definition of '__copy_from_user_inatomic_nocache' was here
76 | __copy_from_user_inatomic_nocache(void *dst, const void __user *src,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/uaccess.h:13,
from arch/x86/include/asm/fpu/xstate.h:5,
from arch/x86/include/asm/pgtable.h:26,
from include/linux/pgtable.h:6,
from include/linux/mm.h:35,
from kernel/power/snapshot.c:19:
arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
46 | static inline bool pagefault_disabled(void);
| ^~~~~~~~~~~~~~~~~~
vim +/raw_copy_to_user +18 arch/x86/include/asm/uaccess_32.h
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 11
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 12 unsigned long __must_check __copy_user_ll
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 13 (void *to, const void *from, unsigned long n);
b1fcec7f2296c4 include/asm-x86/uaccess_32.h Joe Perches 2008-03-23 14 unsigned long __must_check __copy_from_user_ll_nocache_nozero
b1fcec7f2296c4 include/asm-x86/uaccess_32.h Joe Perches 2008-03-23 15 (void *to, const void __user *from, unsigned long n);
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 16
652050aec936fd include/asm-i386/uaccess.h Ingo Molnar 2006-01-14 17 static __always_inline unsigned long __must_check
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 @18 raw_copy_to_user(void __user *to, const void *from, unsigned long n)
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 19 {
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 20 return __copy_user_ll((__force void *)to, from, n);
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 21 }
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 22
7c12d81134b130 include/asm-i386/uaccess.h NeilBrown 2006-06-25 23 static __always_inline unsigned long
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 @24 raw_copy_from_user(void *to, const void __user *from, unsigned long n)
7c12d81134b130 include/asm-i386/uaccess.h NeilBrown 2006-06-25 25 {
beba3a20bf90ce arch/x86/include/asm/uaccess_32.h Al Viro 2017-03-25 26 return __copy_user_ll(to, (__force const void *)from, n);
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 27 }
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 28
652050aec936fd include/asm-i386/uaccess.h Ingo Molnar 2006-01-14 29 static __always_inline unsigned long
b1fcec7f2296c4 include/asm-x86/uaccess_32.h Joe Perches 2008-03-23 @30 __copy_from_user_inatomic_nocache(void *to, const void __user *from,
b1fcec7f2296c4 include/asm-x86/uaccess_32.h Joe Perches 2008-03-23 31 unsigned long n)
^1da177e4c3f41 include/asm-i386/uaccess.h Linus Torvalds 2005-04-16 32 {
7c12d81134b130 include/asm-i386/uaccess.h NeilBrown 2006-06-25 33 return __copy_from_user_ll_nocache_nozero(to, from, n);
c22ce143d15eb2 include/asm-i386/uaccess.h Hiro Yoshioka 2006-06-23 34 }
c22ce143d15eb2 include/asm-i386/uaccess.h Hiro Yoshioka 2006-06-23 35
:::::: The code at line 18 was first introduced by commit
:::::: beba3a20bf90ce1b93e24592c3ebf0d0bb581bbe x86: switch to RAW_COPY_USER
:::::: TO: Al Viro <viro(a)zeniv.linux.org.uk>
:::::: CC: Al Viro <viro(a)zeniv.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[tip:tmp.tmp2 241/364] arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 5bef49c748201f780b3b15803bb38885eb52480b [241/364] sched/headers, mm: Simplify <linux/swap.h> dependencies
config: x86_64-randconfig-a015-20210613 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=5b...
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 5bef49c748201f780b3b15803bb38885eb52480b
# 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 >>):
In file included from kernel/locking/rwsem.c:20:
include/linux/sched.h:459:26: error: field has incomplete type 'struct irqtrace_events'
struct irqtrace_events irqtrace;
^
include/linux/sched.h:459:9: note: forward declaration of 'struct irqtrace_events'
struct irqtrace_events irqtrace;
^
include/linux/sched.h:475:30: error: array has incomplete element type 'struct held_lock'
struct held_lock held_locks[MAX_LOCK_DEPTH];
^
include/linux/sched.h:475:9: note: forward declaration of 'struct held_lock'
struct held_lock held_locks[MAX_LOCK_DEPTH];
^
In file included from kernel/locking/rwsem.c:22:
In file included from include/linux/sched/task.h:11:
In file included from include/linux/uaccess.h:11:
>> arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!access_ok(ptr,len)))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
arch/x86/include/asm/uaccess.h:477:16: note: did you mean 'rt_task'?
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
include/linux/sched/rt.h:16:19: note: 'rt_task' declared here
static inline int rt_task(struct task_struct *p)
^
In file included from kernel/locking/rwsem.c:22:
In file included from include/linux/sched/task.h:11:
In file included from include/linux/uaccess.h:11:
>> arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!access_ok(ptr,len)))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from kernel/locking/rwsem.c:22:
In file included from include/linux/sched/task.h:11:
>> include/linux/uaccess.h:208:6: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from kernel/locking/rwsem.c:22:
In file included from include/linux/sched/task.h:11:
include/linux/uaccess.h:208:26: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
6 errors generated.
--
In file included from kernel/locking/lockdep.c:33:
In file included from include/linux/sched/task.h:11:
In file included from include/linux/uaccess.h:11:
>> arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!access_ok(ptr,len)))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from kernel/locking/lockdep.c:33:
In file included from include/linux/sched/task.h:11:
>> include/linux/uaccess.h:208:6: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from kernel/locking/lockdep.c:33:
In file included from include/linux/sched/task.h:11:
include/linux/uaccess.h:208:26: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from kernel/locking/lockdep.c:64:
In file included from include/trace/events/lock.h:87:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:57:
include/linux/cgroup.h:481:9: error: no member named 'flags' in 'struct task_struct'
return task_css_set_check(task, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
In file included from kernel/locking/lockdep.c:64:
In file included from include/trace/events/lock.h:87:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:57:
include/linux/cgroup.h:494:9: error: no member named 'flags' in 'struct task_struct'
return task_css_check(task, subsys_id, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:471:2: note: expanded from macro 'task_css_check'
task_css_set_check((task), (__c))->subsys[(subsys_id)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
In file included from kernel/locking/lockdep.c:64:
In file included from include/trace/events/lock.h:87:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:10:
In file included from include/linux/perf_event.h:57:
include/linux/cgroup.h:538:9: error: no member named 'flags' in 'struct task_struct'
return task_css_check(task, subsys_id, true) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:471:2: note: expanded from macro 'task_css_check'
task_css_set_check((task), (__c))->subsys[(subsys_id)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
In file included from kernel/locking/lockdep.c:64:
In file included from include/trace/events/lock.h:87:
In file included from include/trace/define_trace.h:102:
In file included from include/trace/trace_events.h:21:
In file included from include/linux/trace_events.h:10:
include/linux/perf_event.h:943:22: error: no member named 'flags' in 'struct task_struct'
return container_of(task_css_check(task, perf_event_cgrp_id,
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:471:2: note: expanded from macro 'task_css_check'
task_css_set_check((task), (__c))->subsys[(subsys_id)]
^
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
--
In file included from mm/kasan/common.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
In file included from include/linux/uaccess.h:11:
>> arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!access_ok(ptr,len)))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from mm/kasan/common.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
>> include/linux/uaccess.h:208:6: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from mm/kasan/common.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
include/linux/uaccess.h:208:26: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from mm/kasan/common.c:31:
In file included from mm/kasan/../slab.h:43:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:17:
include/linux/cgroup.h:481:9: error: no member named 'flags' in 'struct task_struct'
return task_css_set_check(task, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
In file included from mm/kasan/common.c:31:
In file included from mm/kasan/../slab.h:43:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:17:
include/linux/cgroup.h:494:9: error: no member named 'flags' in 'struct task_struct'
return task_css_check(task, subsys_id, false);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:471:2: note: expanded from macro 'task_css_check'
task_css_set_check((task), (__c))->subsys[(subsys_id)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
In file included from mm/kasan/common.c:31:
In file included from mm/kasan/../slab.h:43:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:17:
include/linux/cgroup.h:538:9: error: no member named 'flags' in 'struct task_struct'
return task_css_check(task, subsys_id, true) ==
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:471:2: note: expanded from macro 'task_css_check'
task_css_set_check((task), (__c))->subsys[(subsys_id)]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/cgroup.h:455:12: note: expanded from macro 'task_css_set_check'
((task)->flags & PF_EXITING) || (__c))
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:510:32: note: expanded from macro 'rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:372:21: note: expanded from macro '__rcu_dereference_check'
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:314:52: note: expanded from macro 'RCU_LOCKDEP_WARN'
if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \
^
6 errors generated.
--
In file included from mm/kasan/shadow.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
In file included from include/linux/uaccess.h:11:
>> arch/x86/include/asm/uaccess.h:477:16: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (unlikely(!access_ok(ptr,len)))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from mm/kasan/shadow.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
>> include/linux/uaccess.h:208:6: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
In file included from mm/kasan/shadow.c:14:
In file included from include/linux/kasan.h:28:
In file included from include/linux/pgtable.h:6:
In file included from arch/x86/include/asm/pgtable.h:26:
In file included from arch/x86/include/asm/fpu/xstate.h:5:
include/linux/uaccess.h:208:26: error: implicit declaration of function 'in_task' [-Werror,-Wimplicit-function-declaration]
if (access_ok(to, n) && access_ok(from, n))
^
arch/x86/include/asm/uaccess.h:72:2: note: expanded from macro 'access_ok'
WARN_ON_IN_IRQ(); \
^
arch/x86/include/asm/uaccess.h:48:16: note: expanded from macro 'WARN_ON_IN_IRQ'
WARN_ON_ONCE(!in_task() && !pagefault_disabled())
^
3 errors generated.
..
vim +/in_task +477 arch/x86/include/asm/uaccess.h
ca23386216b9d4 include/asm-x86/uaccess.h Glauber Costa 2008-06-13 468
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 469 /*
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 470 * The "unsafe" user accesses aren't really "unsafe", but the naming
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 471 * is a big fat warning: you have to not only do the access_ok()
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 472 * checking before using them, but you have to surround them with the
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 473 * user_access_begin/end() pair.
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 474 */
b7f89bfe52cd52 arch/x86/include/asm/uaccess.h Peter Zijlstra 2019-04-03 475 static __must_check __always_inline bool user_access_begin(const void __user *ptr, size_t len)
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 476 {
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 @477 if (unlikely(!access_ok(ptr,len)))
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 478 return 0;
6e693b3ffecb0b arch/x86/include/asm/uaccess.h Will Deacon 2019-01-19 479 __uaccess_begin_nospec();
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 480 return 1;
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 481 }
594cc251fdd0d2 arch/x86/include/asm/uaccess.h Linus Torvalds 2019-01-04 482 #define user_access_begin(a,b) user_access_begin(a,b)
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 483 #define user_access_end() __uaccess_end()
5b24a7a2aa2040 arch/x86/include/asm/uaccess.h Linus Torvalds 2015-12-17 484
:::::: The code at line 477 was first introduced by commit
:::::: 594cc251fdd0d231d342d88b2fdff4bc42fb0690 make 'user_access_begin()' do 'access_ok()'
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months