Re: [PATCH 1/2] sched: Introduce rcuwait machinery

From: kbuild test robot
Date: Thu Dec 22 2016 - 14:55:49 EST


Hi Davidlohr,

[auto build test ERROR on tip/auto-latest]
[also build test ERROR on v4.9 next-20161222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Davidlohr-Bueso/sched-Introduce-rcuwait/20161223-020109
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k

Note: the linux-review/Davidlohr-Bueso/sched-Introduce-rcuwait/20161223-020109 HEAD 9e9d238f94d5aa8e348e7e70585533fe0dbd373b builds fine.
It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

>> kernel/exit.c:285:29: warning: 'struct rcuwait' declared inside parameter list
void rcuwait_trywake(struct rcuwait *w)
^
>> kernel/exit.c:285:29: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from include/linux/srcu.h:33:0,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:751,
from include/linux/gfp.h:5,
from include/linux/mm.h:9,
from kernel/exit.c:7:
kernel/exit.c: In function 'rcuwait_trywake':
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/rcupdate.h:606:10: note: in definition of macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/rcupdate.h:606:36: note: in definition of macro '__rcu_dereference_check'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
In file included from include/asm-generic/bug.h:4:0,
from arch/m68k/include/asm/bug.h:28,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from kernel/exit.c:7:
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:563:9: note: in definition of macro 'lockless_dereference'
typeof(p) _________p1 = READ_ONCE(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
In file included from include/asm-generic/bug.h:4:0,
from arch/m68k/include/asm/bug.h:28,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from kernel/exit.c:7:
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:305:17: note: in definition of macro '__READ_ONCE'
union { typeof(x) __val; char __c[1]; } __u; \
^
>> include/linux/compiler.h:563:26: note: in expansion of macro 'READ_ONCE'
typeof(p) _________p1 = READ_ONCE(p); \
^
>> include/linux/rcupdate.h:606:48: note: in expansion of macro 'lockless_dereference'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:307:22: note: in definition of macro '__READ_ONCE'
__read_once_size(&(x), __u.__c, sizeof(x)); \
^
>> include/linux/compiler.h:563:26: note: in expansion of macro 'READ_ONCE'
typeof(p) _________p1 = READ_ONCE(p); \
^
>> include/linux/rcupdate.h:606:48: note: in expansion of macro 'lockless_dereference'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:307:42: note: in definition of macro '__READ_ONCE'
__read_once_size(&(x), __u.__c, sizeof(x)); \
^
>> include/linux/compiler.h:563:26: note: in expansion of macro 'READ_ONCE'
typeof(p) _________p1 = READ_ONCE(p); \
^
>> include/linux/rcupdate.h:606:48: note: in expansion of macro 'lockless_dereference'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:309:30: note: in definition of macro '__READ_ONCE'
__read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
^
>> include/linux/compiler.h:563:26: note: in expansion of macro 'READ_ONCE'
typeof(p) _________p1 = READ_ONCE(p); \
^
>> include/linux/rcupdate.h:606:48: note: in expansion of macro 'lockless_dereference'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
>> kernel/exit.c:308:26: error: dereferencing pointer to incomplete type
task = rcu_dereference(w->task);
^
include/linux/compiler.h:309:50: note: in definition of macro '__READ_ONCE'
__read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
^
>> include/linux/compiler.h:563:26: note: in expansion of macro 'READ_ONCE'
typeof(p) _________p1 = READ_ONCE(p); \
^
>> include/linux/rcupdate.h:606:48: note: in expansion of macro 'lockless_dereference'
typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \
^
include/linux/rcupdate.h:727:2: note: in expansion of macro '__rcu_dereference_check'
__rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
^
include/linux/rcupdate.h:786:28: note: in expansion of macro 'rcu_dereference_check'
#define rcu_dereference(p) rcu_dereference_check(p, 0)
^
kernel/exit.c:308:9: note: in expansion of macro 'rcu_dereference'
task = rcu_dereference(w->task);
^
In file included from include/asm-generic/bug.h:4:0,
from arch/m68k/include/asm/bug.h:28,
from include/linux/bug.h:4,
from include/linux/mmdebug.h:4,
from include/linux/mm.h:8,
from kernel/exit.c:7:

vim +308 kernel/exit.c

279 if (!sighand)
280 return NULL;
281
282 return task;
283 }
284
> 285 void rcuwait_trywake(struct rcuwait *w)
286 {
287 struct task_struct *task;
288
289 rcu_read_lock();
290
291 /*
292 * Order condition vs @task, such that everything prior to the load
293 * of @task is visible. This is the condition as to why the user called
294 * rcuwait_trywake() in the first place. Pairs with set_current_state()
295 * barrier (A) in rcuwait_wait_event().
296 *
297 * WAIT WAKE
298 * [S] tsk = current [S] cond = true
299 * MB (A) MB (B)
300 * [L] cond [L] tsk
301 */
302 smp_rmb(); /* (B) */
303
304 /*
305 * Avoid using task_rcu_dereference() magic as long as we are careful,
306 * see comment in rcuwait_wait_event() regarding ->exit_state.
307 */
> 308 task = rcu_dereference(w->task);
309 if (task)
310 wake_up_process(task);
311 rcu_read_unlock();

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip