* Re: [PATCH v3 net 1/2] net: Fix dev_net(dev) race in unregister_netdevice_notifier_dev_net().
[not found] <20250211051217.12613-2-kuniyu@amazon.com>
@ 2025-02-12 0:16 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-12 0:16 UTC (permalink / raw)
To: Kuniyuki Iwashima, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman
Cc: llvm, oe-kbuild-all, netdev, Kuniyuki Iwashima, Yael Chemla
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
^ permalink raw reply [flat|nested] only message in thread