From: kernel test robot <lkp@intel.com>
To: Fan Wu <fanwu01@zju.edu.cn>, <gregkh@linuxfoundation.org>,
<tj@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>, <chenridong@huawei.com>,
<driver-core@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
Fan Wu <fanwu01@zju.edu.cn>, <stable@vger.kernel.org>
Subject: Re: [PATCH v2] kernfs: recheck of->released after acquiring the active reference
Date: Sun, 23 Aug 2026 20:27:12 +0800 [thread overview]
Message-ID: <202608230052.ZXfVhNjk-lkp@intel.com> (raw)
In-Reply-To: <20260821050720.14848-1-fanwu01@zju.edu.cn>
Hi Fan,
kernel test robot noticed the following build errors:
[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on driver-core/driver-core-next driver-core/driver-core-linus linus/master v7.2 next-20260821]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Fan-Wu/kernfs-recheck-of-released-after-acquiring-the-active-reference/20260821-050720
base: driver-core/driver-core-testing
patch link: https://lore.kernel.org/r/20260821050720.14848-1-fanwu01%40zju.edu.cn
patch subject: [PATCH v2] kernfs: recheck of->released after acquiring the active reference
config: nios2-allnoconfig (https://download.01.org/0day-ci/archive/20260823/202608230052.ZXfVhNjk-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260823/202608230052.ZXfVhNjk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608230052.ZXfVhNjk-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/asm-generic/div64.h:27,
from ./arch/nios2/include/generated/asm/div64.h:1,
from include/linux/math.h:6,
from include/linux/math64.h:6,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/fs_dirent.h:5,
from include/linux/fs/super_types.h:5,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from fs/kernfs/file.c:10:
fs/kernfs/file.c: In function 'kernfs_get_active_of':
>> include/linux/compiler_types.h:663:16: error: 'sizeof' applied to a bit-field
663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _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:36:28: note: in expansion of macro '__native_word'
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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
include/linux/compiler_types.h:663:45: error: 'sizeof' applied to a bit-field
663 | (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _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:36:28: note: in expansion of macro '__native_word'
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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
include/linux/compiler_types.h:664:16: error: 'sizeof' applied to a bit-field
664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _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:36:28: note: in expansion of macro '__native_word'
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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
include/linux/compiler_types.h:664:44: error: 'sizeof' applied to a bit-field
664 | sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _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:36:28: note: in expansion of macro '__native_word'
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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
>> include/asm-generic/rwonce.h:36:54: error: 'sizeof' applied to a bit-field
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _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); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
>> include/linux/compiler_types.h:626:17: error: 'typeof' applied to a bit-field
626 | _Generic((x), \
| ^~~~~~~~
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/asm-generic/rwonce.h:44:43: note: in expansion of macro '__unqual_scalar_typeof'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
>> include/asm-generic/rwonce.h:44:71: error: cannot take address of bit-field 'released'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
fs/kernfs/file.c:76:22: note: in expansion of macro 'READ_ONCE'
76 | if (unlikely(READ_ONCE(of->released))) {
| ^~~~~~~~~
vim +/sizeof +663 include/linux/compiler_types.h
d15155824c5014 Will Deacon 2017-10-24 611
dee081bf8f824c Will Deacon 2019-12-19 612 /*
dee081bf8f824c Will Deacon 2019-12-19 613 * __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
dee081bf8f824c Will Deacon 2019-12-19 614 * non-scalar types unchanged.
1fd76043ecb04b Marco Elver 2020-05-27 615 */
fd69b2f7d5f4e1 Peter Zijlstra 2026-01-16 616 #ifndef USE_TYPEOF_UNQUAL
1fd76043ecb04b Marco Elver 2020-05-27 617 /*
6ec4476ac82512 Linus Torvalds 2020-07-08 618 * Prefer C11 _Generic for better compile-times and simpler code. Note: 'char'
1fd76043ecb04b Marco Elver 2020-05-27 619 * is not type-compatible with 'signed char', and we define a separate case.
1fd76043ecb04b Marco Elver 2020-05-27 620 */
1fd76043ecb04b Marco Elver 2020-05-27 621 #define __scalar_type_to_expr_cases(type) \
1fd76043ecb04b Marco Elver 2020-05-27 622 unsigned type: (unsigned type)0, \
1fd76043ecb04b Marco Elver 2020-05-27 623 signed type: (signed type)0
1fd76043ecb04b Marco Elver 2020-05-27 624
1fd76043ecb04b Marco Elver 2020-05-27 625 #define __unqual_scalar_typeof(x) typeof( \
1fd76043ecb04b Marco Elver 2020-05-27 @626 _Generic((x), \
1fd76043ecb04b Marco Elver 2020-05-27 627 char: (char)0, \
1fd76043ecb04b Marco Elver 2020-05-27 628 __scalar_type_to_expr_cases(char), \
1fd76043ecb04b Marco Elver 2020-05-27 629 __scalar_type_to_expr_cases(short), \
1fd76043ecb04b Marco Elver 2020-05-27 630 __scalar_type_to_expr_cases(int), \
1fd76043ecb04b Marco Elver 2020-05-27 631 __scalar_type_to_expr_cases(long), \
1fd76043ecb04b Marco Elver 2020-05-27 632 __scalar_type_to_expr_cases(long long), \
1fd76043ecb04b Marco Elver 2020-05-27 633 default: (x)))
fd69b2f7d5f4e1 Peter Zijlstra 2026-01-16 634 #else
fd69b2f7d5f4e1 Peter Zijlstra 2026-01-16 635 #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
fd69b2f7d5f4e1 Peter Zijlstra 2026-01-16 636 #endif
c06cd66387da92 Thomas Gleixner 2026-06-02 637
c06cd66387da92 Thomas Gleixner 2026-06-02 638 #include <asm/percpu_types.h>
c06cd66387da92 Thomas Gleixner 2026-06-02 639
fd69b2f7d5f4e1 Peter Zijlstra 2026-01-16 640 #endif /* !__ASSEMBLY__ */
dee081bf8f824c Will Deacon 2019-12-19 641
38a68b982dd0b1 Peter Zijlstra 2025-11-27 642 /*
38a68b982dd0b1 Peter Zijlstra 2025-11-27 643 * __signed_scalar_typeof(x) - Declare a signed scalar type, leaving
38a68b982dd0b1 Peter Zijlstra 2025-11-27 644 * non-scalar types unchanged.
38a68b982dd0b1 Peter Zijlstra 2025-11-27 645 */
38a68b982dd0b1 Peter Zijlstra 2025-11-27 646
38a68b982dd0b1 Peter Zijlstra 2025-11-27 647 #define __scalar_type_to_signed_cases(type) \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 648 unsigned type: (signed type)0, \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 649 signed type: (signed type)0
38a68b982dd0b1 Peter Zijlstra 2025-11-27 650
38a68b982dd0b1 Peter Zijlstra 2025-11-27 651 #define __signed_scalar_typeof(x) typeof( \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 652 _Generic((x), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 653 char: (signed char)0, \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 654 __scalar_type_to_signed_cases(char), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 655 __scalar_type_to_signed_cases(short), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 656 __scalar_type_to_signed_cases(int), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 657 __scalar_type_to_signed_cases(long), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 658 __scalar_type_to_signed_cases(long long), \
38a68b982dd0b1 Peter Zijlstra 2025-11-27 659 default: (x)))
38a68b982dd0b1 Peter Zijlstra 2025-11-27 660
d15155824c5014 Will Deacon 2017-10-24 661 /* Is this type a native word size -- useful for atomic operations */
815f0ddb346c19 Nick Desaulniers 2018-08-22 662 #define __native_word(t) \
815f0ddb346c19 Nick Desaulniers 2018-08-22 @663 (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
815f0ddb346c19 Nick Desaulniers 2018-08-22 664 sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
815f0ddb346c19 Nick Desaulniers 2018-08-22 665
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-08-23 12:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 2:18 [PATCH] kernfs: recheck of->released after acquiring the active reference Fan Wu
2026-08-20 17:46 ` Tejun Heo
2026-08-21 5:07 ` [PATCH v2] " Fan Wu
2026-08-21 19:21 ` Tejun Heo
2026-08-23 12:27 ` kernel test robot [this message]
2026-08-23 12:27 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608230052.ZXfVhNjk-lkp@intel.com \
--to=lkp@intel.com \
--cc=chenridong@huawei.com \
--cc=driver-core@lists.linux.dev \
--cc=fanwu01@zju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox