Hi yanghui,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on v5.14-rc5]
[cannot apply to hnaz-linux-mm/master next-20210813]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/yanghui/mm-mempolicy-fix-a-race-...
base: 36a21d51725af2ce0700c6ebcb6b9594aac658a6
config: ia64-randconfig-c024-20210813 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/99d8d888eb92ea46a5f4883773f3edaee...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
yanghui/mm-mempolicy-fix-a-race-between-offset_il_node-and-mpol_rebind_task/20210814-004451
git checkout 99d8d888eb92ea46a5f4883773f3edaee5ccd28e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=ia64 SHELL=/bin/bash
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/ia64/include/asm/pgtable.h:153,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/dax.h:5,
from include/linux/mempolicy.h:11,
from mm/mempolicy.c:70:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but
not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from <command-line>:
mm/mempolicy.c: In function 'mpol_new_interleave':
> include/linux/compiler_types.h:328:45: error: call to
'__compiletime_assert_319' declared with attribute error: Unsupported access size
for {READ,WRITE}_ONCE().
328 | _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:309:25: note: in definition of macro
'__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro
'_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro
'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),
\
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro
'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/mempolicy.c:196:9: note: in expansion of macro 'WRITE_ONCE'
196 | WRITE_ONCE(pol->nodes, *nodes);
| ^~~~~~~~~~
mm/mempolicy.c: In function 'mpol_new_bind':
include/linux/compiler_types.h:328:45: error: call to
'__compiletime_assert_320' declared with attribute error: Unsupported access size
for {READ,WRITE}_ONCE().
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^
include/linux/compiler_types.h:309:25: note: in definition of macro
'__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro
'_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro
'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),
\
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro
'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/mempolicy.c:214:9: note: in expansion of macro 'WRITE_ONCE'
214 | WRITE_ONCE(pol->nodes, *nodes);
| ^~~~~~~~~~
mm/mempolicy.c: In function 'offset_il_node':
include/linux/compiler_types.h:328:45: error: call to
'__compiletime_assert_326' declared with attribute error: Unsupported access size
for {READ,WRITE}_ONCE().
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^
include/linux/compiler_types.h:309:25: note: in definition of macro
'__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro
'_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro
'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),
\
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro
'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/mempolicy.c:1968:31: note: in expansion of macro 'READ_ONCE'
1968 | nodemask_t nodemask = READ_ONCE(pol->nodes);
| ^~~~~~~~~
mm/mempolicy.c: In function 'mpol_rebind_nodemask':
include/linux/compiler_types.h:328:45: error: call to
'__compiletime_assert_321' declared with attribute error: Unsupported access size
for {READ,WRITE}_ONCE().
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^
include/linux/compiler_types.h:309:25: note: in definition of macro
'__compiletime_assert'
309 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:328:9: note: in expansion of macro
'_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro
'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long),
\
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro
'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mm/mempolicy.c:337:9: note: in expansion of macro 'WRITE_ONCE'
337 | WRITE_ONCE(pol->nodes, tmp);
| ^~~~~~~~~~
vim +/__compiletime_assert_319 +328 include/linux/compiler_types.h
eb5c2d4b45e3d2d Will Deacon 2020-07-21 314
eb5c2d4b45e3d2d Will Deacon 2020-07-21 315 #define _compiletime_assert(condition, msg,
prefix, suffix) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 316 __compiletime_assert(condition, msg, prefix,
suffix)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 317
eb5c2d4b45e3d2d Will Deacon 2020-07-21 318 /**
eb5c2d4b45e3d2d Will Deacon 2020-07-21 319 * compiletime_assert - break build and emit
msg if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 320 * @condition: a compile-time constant
condition to check
eb5c2d4b45e3d2d Will Deacon 2020-07-21 321 * @msg: a message to emit if condition
is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 322 *
eb5c2d4b45e3d2d Will Deacon 2020-07-21 323 * In tradition of POSIX assert, this macro
will break the build if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 324 * supplied condition is *false*, emitting
the supplied error message if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 325 * compiler has support to do so.
eb5c2d4b45e3d2d Will Deacon 2020-07-21 326 */
eb5c2d4b45e3d2d Will Deacon 2020-07-21 327 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 @328 _compiletime_assert(condition, msg,
__compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 329
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org