public inbox for wireguard@lists.zx2c4.com
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Fushuai Wang <wangfushuai@baidu.com>,
	Jason@zx2c4.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, wireguard@lists.zx2c4.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Fushuai Wang <wangfushuai@baidu.com>
Subject: Re: [PATCH] wireguard: allowedips: Use kfree_rcu() instead of call_rcu()
Date: Fri, 10 Oct 2025 00:48:53 +0800	[thread overview]
Message-ID: <202510100057.ZUiqBtur-lkp@intel.com> (raw)
In-Reply-To: <20251005122626.26988-1-wangfushuai@baidu.com>

Hi Fushuai,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on crng-random/master v6.17 next-20251009]
[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/Fushuai-Wang/wireguard-allowedips-Use-kfree_rcu-instead-of-call_rcu/20251009-142048
base:   linus/master
patch link:    https://lore.kernel.org/r/20251005122626.26988-1-wangfushuai%40baidu.com
patch subject: [PATCH] wireguard: allowedips: Use kfree_rcu() instead of call_rcu()
config: m68k-hp300_defconfig (https://download.01.org/0day-ci/archive/20251010/202510100057.ZUiqBtur-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251010/202510100057.ZUiqBtur-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/202510100057.ZUiqBtur-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   drivers/net/wireguard/allowedips.c: In function 'remove_node':
>> include/linux/stddef.h:16:33: error: '*0' is a pointer; did you mean to use '->'?
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:575:23: note: in definition of macro '__compiletime_assert'
     575 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:595:9: note: in expansion of macro '_compiletime_assert'
     595 |         _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/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:1124:17: note: in expansion of macro 'BUILD_BUG_ON'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                 ^~~~~~~~~~~~
   include/linux/rcupdate.h:1124:30: note: in expansion of macro 'offsetof'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                              ^~~~~~~~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   drivers/net/wireguard/allowedips.c:269:9: note: in expansion of macro 'kfree_rcu'
     269 |         kfree_rcu(&node, rcu);
         |         ^~~~~~~~~
   In file included from include/linux/rculist.h:11,
                    from include/linux/dcache.h:8,
                    from include/linux/fs.h:9,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/skbuff.h:17,
                    from include/linux/ip.h:16,
                    from drivers/net/wireguard/allowedips.h:10,
                    from drivers/net/wireguard/allowedips.c:6:
>> include/linux/rcupdate.h:1125:41: error: '___p' is a pointer to pointer; did you mean to dereference it before applying '->' to it?
    1125 |                 kvfree_call_rcu(&((___p)->rhf), (void *) (___p));       \
         |                                         ^~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   drivers/net/wireguard/allowedips.c:269:9: note: in expansion of macro 'kfree_rcu'
     269 |         kfree_rcu(&node, rcu);
         |         ^~~~~~~~~
>> include/linux/stddef.h:16:33: error: '*0' is a pointer; did you mean to use '->'?
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:575:23: note: in definition of macro '__compiletime_assert'
     575 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:595:9: note: in expansion of macro '_compiletime_assert'
     595 |         _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/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:1124:17: note: in expansion of macro 'BUILD_BUG_ON'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                 ^~~~~~~~~~~~
   include/linux/rcupdate.h:1124:30: note: in expansion of macro 'offsetof'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                              ^~~~~~~~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   drivers/net/wireguard/allowedips.c:275:9: note: in expansion of macro 'kfree_rcu'
     275 |         kfree_rcu(&parent, rcu);
         |         ^~~~~~~~~
>> include/linux/rcupdate.h:1125:41: error: '___p' is a pointer to pointer; did you mean to dereference it before applying '->' to it?
    1125 |                 kvfree_call_rcu(&((___p)->rhf), (void *) (___p));       \
         |                                         ^~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   drivers/net/wireguard/allowedips.c:275:9: note: in expansion of macro 'kfree_rcu'
     275 |         kfree_rcu(&parent, rcu);
         |         ^~~~~~~~~
--
   In file included from <command-line>:
   allowedips.c: In function 'remove_node':
>> include/linux/stddef.h:16:33: error: '*0' is a pointer; did you mean to use '->'?
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:575:23: note: in definition of macro '__compiletime_assert'
     575 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:595:9: note: in expansion of macro '_compiletime_assert'
     595 |         _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/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:1124:17: note: in expansion of macro 'BUILD_BUG_ON'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                 ^~~~~~~~~~~~
   include/linux/rcupdate.h:1124:30: note: in expansion of macro 'offsetof'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                              ^~~~~~~~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   allowedips.c:269:9: note: in expansion of macro 'kfree_rcu'
     269 |         kfree_rcu(&node, rcu);
         |         ^~~~~~~~~
   In file included from include/linux/rculist.h:11,
                    from include/linux/dcache.h:8,
                    from include/linux/fs.h:9,
                    from include/linux/highmem.h:5,
                    from include/linux/bvec.h:10,
                    from include/linux/skbuff.h:17,
                    from include/linux/ip.h:16,
                    from allowedips.h:10,
                    from allowedips.c:6:
>> include/linux/rcupdate.h:1125:41: error: '___p' is a pointer to pointer; did you mean to dereference it before applying '->' to it?
    1125 |                 kvfree_call_rcu(&((___p)->rhf), (void *) (___p));       \
         |                                         ^~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   allowedips.c:269:9: note: in expansion of macro 'kfree_rcu'
     269 |         kfree_rcu(&node, rcu);
         |         ^~~~~~~~~
>> include/linux/stddef.h:16:33: error: '*0' is a pointer; did you mean to use '->'?
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:575:23: note: in definition of macro '__compiletime_assert'
     575 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler_types.h:595:9: note: in expansion of macro '_compiletime_assert'
     595 |         _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/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/rcupdate.h:1124:17: note: in expansion of macro 'BUILD_BUG_ON'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                 ^~~~~~~~~~~~
   include/linux/rcupdate.h:1124:30: note: in expansion of macro 'offsetof'
    1124 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
         |                              ^~~~~~~~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   allowedips.c:275:9: note: in expansion of macro 'kfree_rcu'
     275 |         kfree_rcu(&parent, rcu);
         |         ^~~~~~~~~
>> include/linux/rcupdate.h:1125:41: error: '___p' is a pointer to pointer; did you mean to dereference it before applying '->' to it?
    1125 |                 kvfree_call_rcu(&((___p)->rhf), (void *) (___p));       \
         |                                         ^~
   include/linux/rcupdate.h:1087:29: note: in expansion of macro 'kvfree_rcu_arg_2'
    1087 | #define kfree_rcu(ptr, rhf) kvfree_rcu_arg_2(ptr, rhf)
         |                             ^~~~~~~~~~~~~~~~
   allowedips.c:275:9: note: in expansion of macro 'kfree_rcu'
     275 |         kfree_rcu(&parent, rcu);
         |         ^~~~~~~~~


vim +16 include/linux/stddef.h

6e218287432472 Richard Knutsson 2006-09-30  14  
^1da177e4c3f41 Linus Torvalds   2005-04-16  15  #undef offsetof
14e83077d55ff4 Rasmus Villemoes 2022-03-23 @16  #define offsetof(TYPE, MEMBER)	__builtin_offsetof(TYPE, MEMBER)
3876488444e712 Denys Vlasenko   2015-03-09  17  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2025-10-09 16:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-05 12:26 [PATCH] wireguard: allowedips: Use kfree_rcu() instead of call_rcu() Fushuai Wang
2025-10-05 13:04 ` Eric Dumazet
2025-10-05 13:30   ` Fushuai Wang
2025-10-09 16:48 ` kernel test robot [this message]

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=202510100057.ZUiqBtur-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jason@zx2c4.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=wangfushuai@baidu.com \
    --cc=wireguard@lists.zx2c4.com \
    /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