From: kernel test robot <lkp@intel.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, Kuniyuki Iwashima <kuniyu@amazon.com>,
Yael Chemla <ychemla@nvidia.com>
Subject: Re: [PATCH v3 net 1/2] net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net().
Date: Wed, 12 Feb 2025 08:16:27 +0800 [thread overview]
Message-ID: <202502120733.xsF3H4iE-lkp@intel.com> (raw)
In-Reply-To: <20250211051217.12613-2-kuniyu@amazon.com>
Hi Kuniyuki,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/net-Fix-dev_net-dev-race-in-unregister_netdevice_notifier_dev_net/20250211-131633
base: net/main
patch link: https://lore.kernel.org/r/20250211051217.12613-2-kuniyu%40amazon.com
patch subject: [PATCH v3 net 1/2] net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net().
config: s390-randconfig-002-20250212 (https://download.01.org/0day-ci/archive/20250212/202502120733.xsF3H4iE-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120733.xsF3H4iE-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/202502120733.xsF3H4iE-lkp@intel.com/
All errors (new ones prefixed by >>):
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:10: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:31: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:542:22: note: expanded from macro 'compiletime_assert'
542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:530:23: note: expanded from macro '_compiletime_assert'
530 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:522:9: note: expanded from macro '__compiletime_assert'
522 | if (!(condition)) \
| ^~~~~~~~~
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:542:22: note: expanded from macro 'compiletime_assert'
542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:530:23: note: expanded from macro '_compiletime_assert'
530 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:522:9: note: expanded from macro '__compiletime_assert'
522 | if (!(condition)) \
| ^~~~~~~~~
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:542:22: note: expanded from macro 'compiletime_assert'
542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:530:23: note: expanded from macro '_compiletime_assert'
530 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:522:9: note: expanded from macro '__compiletime_assert'
522 | if (!(condition)) \
| ^~~~~~~~~
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:542:22: note: expanded from macro 'compiletime_assert'
542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:530:23: note: expanded from macro '_compiletime_assert'
530 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:522:9: note: expanded from macro '__compiletime_assert'
522 | if (!(condition)) \
| ^~~~~~~~~
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
49 | compiletime_assert_rwonce_type(x); \
| ^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:542:22: note: expanded from macro 'compiletime_assert'
542 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:530:23: note: expanded from macro '_compiletime_assert'
530 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:522:9: note: expanded from macro '__compiletime_assert'
522 | if (!(condition)) \
| ^~~~~~~~~
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/compiler_types.h:498:13: note: expanded from macro '__unqual_scalar_typeof'
498 | _Generic((x), \
| ^
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
include/linux/compiler_types.h:505:15: note: expanded from macro '__unqual_scalar_typeof'
505 | default: (x)))
| ^
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:531:53: note: expanded from macro '__rcu_access_pointer'
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
50 | __READ_ONCE(x); \
| ^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
>> net/core/dev.c:2087:50: error: no member named 'net' in 'possible_net_t'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ~~~~~~~~~~~ ^
include/linux/rcupdate.h:650:53: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^
include/linux/rcupdate.h:533:12: note: expanded from macro '__rcu_access_pointer'
533 | ((typeof(*p) __force __kernel *)(local)); \
| ^
>> net/core/dev.c:2087:19: error: passing 'void' to parameter of incompatible type 'const struct net *'
2087 | if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:650:31: note: expanded from macro 'rcu_access_pointer'
650 | #define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:529:47: note: expanded from macro '__rcu_access_pointer'
529 | #define __rcu_access_pointer(p, local, space) \
| ^
530 | ({ \
| ~~~~
531 | typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532 | rcu_check_sparse(p, space); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
533 | ((typeof(*p) __force __kernel *)(local)); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
534 | })
| ~~
include/net/net_namespace.h:318:54: note: passing argument to parameter 'net2' here
318 | int net_eq(const struct net *net1, const struct net *net2)
| ^
>> net/core/dev.c:2089:14: error: called object type 'void *' is not a function or function pointer
2089 | net_drop_ns(net);
| ~~~~~~~~~~~^
net/core/dev.c:2099:13: error: called object type 'void *' is not a function or function pointer
2099 | net_drop_ns(net);
| ~~~~~~~~~~~^
14 errors generated.
vim +2087 net/core/dev.c
2072
2073 static void rtnl_net_dev_lock(struct net_device *dev)
2074 {
2075 struct net *net;
2076
2077 again:
2078 /* netns might be being dismantled. */
2079 rcu_read_lock();
2080 net = dev_net_rcu(dev);
2081 refcount_inc(&net->passive);
2082 rcu_read_unlock();
2083
2084 rtnl_net_lock(net);
2085
2086 /* dev might have been moved to another netns. */
> 2087 if (!net_eq(net, rcu_access_pointer(dev->nd_net.net))) {
2088 rtnl_net_unlock(net);
> 2089 net_drop_ns(net);
2090 goto again;
2091 }
2092 }
2093
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-02-12 0:17 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250211051217.12613-2-kuniyu@amazon.com>]
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=202502120733.xsF3H4iE-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=ychemla@nvidia.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