Re: [PATCH] fsnotify: use rcu_access_pointer() to test the mark connector pointers

From: kernel test robot

Date: Wed Dec 02 2026 - 20:04:06 EST


Hi Jiayi,

kernel test robot noticed the following build errors:

[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on jack-fs/fsnotify linus/master v7.4-rc5 next-20261130]
[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/Jiayi-Zhang/fsnotify-use-rcu_access_pointer-to-test-the-mark-connector-pointers/20261202-181338
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20261202181338.4162502-1-zhangjiayi1014%40gmail.com
patch subject: [PATCH] fsnotify: use rcu_access_pointer() to test the mark connector pointers
config: arm-randconfig-1003-20261203 (https://download.01.org/0day-ci/archive/20261203/20261203083353.XuNYnFsf-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261203/20261203083353.XuNYnFsf-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261203083353.XuNYnFsf-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from include/linux/compiler_types.h:44,
from <command-line>:
fs/mount.h: In function 'mnt_notify_add':
>> include/linux/rcupdate.h:504:9: error: dereferencing pointer to incomplete type 'struct fsnotify_mark_connector'
typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
^
include/linux/compiler-context-analysis.h:218:2: note: in definition of macro 'context_unsafe'
__VA_ARGS__; \
^~~~~~~~~~~
include/linux/rcupdate.h:625:31: note: in expansion of macro '__rcu_access_pointer'
#define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
^~~~~~~~~~~~~~~~~~~~
fs/mount.h:247:20: note: in expansion of macro 'rcu_access_pointer'
if ((m->mnt_ns && rcu_access_pointer(m->mnt_ns->n_fsnotify_marks)) ||
^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/compiler_types.h:44,
from <command-line>:
fs/autofs/../mount.h: In function 'mnt_notify_add':
>> include/linux/rcupdate.h:504:9: error: dereferencing pointer to incomplete type 'struct fsnotify_mark_connector'
typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
^
include/linux/compiler-context-analysis.h:218:2: note: in definition of macro 'context_unsafe'
__VA_ARGS__; \
^~~~~~~~~~~
include/linux/rcupdate.h:625:31: note: in expansion of macro '__rcu_access_pointer'
#define rcu_access_pointer(p) __rcu_access_pointer((p), __UNIQUE_ID(rcu), __rcu)
^~~~~~~~~~~~~~~~~~~~
fs/autofs/../mount.h:247:20: note: in expansion of macro 'rcu_access_pointer'
if ((m->mnt_ns && rcu_access_pointer(m->mnt_ns->n_fsnotify_marks)) ||
^~~~~~~~~~~~~~~~~~


vim +504 include/linux/rcupdate.h

76c8eaafe4f061f Paul E. McKenney 2021-04-21 501
573d76f7db5ba05 Paul E. McKenney 2026-06-28 502 #define __rcu_access_pointer(p, local, space) context_unsafe( \
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 503 ({ \
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 @504 typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
423a86a610cad12 Joel Fernandes (Google 2018-12-12 505) rcu_check_sparse(p, space); \
0381ade2ea82b48 Ricardo Ribalda 2026-09-14 506 ((TYPEOF_NO_ADDRESS_SPACE(*p) __force __kernel *)(local)); \
573d76f7db5ba05 Paul E. McKenney 2026-06-28 507 }) )
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 508 #define __rcu_dereference_check(p, local, c, space) \
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 509 ({ \
ac59853c06993a4 Pranith Kumar 2014-11-13 510 /* Dependency order vs. p above. */ \
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 511 typeof(*p) *local = (typeof(*p) *__force)READ_ONCE(p); \
f78f5b90c4ffa55 Paul E. McKenney 2015-06-18 512 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
423a86a610cad12 Joel Fernandes (Google 2018-12-12 513) rcu_check_sparse(p, space); \
0381ade2ea82b48 Ricardo Ribalda 2026-09-14 514 ((TYPEOF_NO_ADDRESS_SPACE(*p) __force __kernel *)(local)); \
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 515 })
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 516 #define __rcu_dereference_protected(p, local, c, space) \
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 517 ({ \
f78f5b90c4ffa55 Paul E. McKenney 2015-06-18 518 RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
423a86a610cad12 Joel Fernandes (Google 2018-12-12 519) rcu_check_sparse(p, space); \
0381ade2ea82b48 Ricardo Ribalda 2026-09-14 520 ((TYPEOF_NO_ADDRESS_SPACE(*p) __force __kernel *)(p)); \
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 521 })
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 522 #define __rcu_dereference_raw(p, local) \
995f1405610bd84 Paul E. McKenney 2016-07-01 523 ({ \
995f1405610bd84 Paul E. McKenney 2016-07-01 524 /* Dependency order vs. p above. */ \
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 525 typeof(p) local = READ_ONCE(p); \
0381ade2ea82b48 Ricardo Ribalda 2026-09-14 526 ((TYPEOF_NO_ADDRESS_SPACE(*p) __force __kernel *)(local)); \
995f1405610bd84 Paul E. McKenney 2016-07-01 527 })
24ba53017e188e0 Chun-Hung Tseng 2021-09-15 528 #define rcu_dereference_raw(p) __rcu_dereference_raw(p, __UNIQUE_ID(rcu))
ca5ecddfa8fcbd9 Paul E. McKenney 2010-04-28 529

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