Re: [PATCH 1/2] sched: Introduce rcuwait machinery
From: kbuild test robot
Date: Thu Dec 22 2016 - 14:27:46 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: i386-randconfig-s1-201651 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
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 will not be visible outside of this definition or declaration
void rcuwait_trywake(struct rcuwait *w)
^~~~~~~
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 'struct rcuwait'
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);
^~~~~~~~~~~~~~~
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