Hi Edward, kernel test robot noticed the following build errors: [auto build test ERROR on pcmoore-selinux/next] [also build test ERROR on linus/master v6.14-rc6 next-20250307] [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/Edward-Adam-Davis/selinux-read-and-write-sid-under-lock/20250309-130846 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next patch link: https://lore.kernel.org/r/tencent_0BEE86CD3878D26D402DDD6F949484E96E0A%40qq.com patch subject: [PATCH] selinux: read and write sid under lock config: i386-defconfig (https://download.01.org/0day-ci/archive/20250310/202503101039.wURTMnYj-lkp@xxxxxxxxx/config) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503101039.wURTMnYj-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/202503101039.wURTMnYj-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> security/selinux/hooks.c:4718:21: error: no member named 'lock' in 'struct sk_security_struct' 4718 | spin_lock(&sksec->lock); | ~~~~~ ^ security/selinux/hooks.c:4721:23: error: no member named 'lock' in 'struct sk_security_struct' 4721 | spin_unlock(&sksec->lock); | ~~~~~ ^ security/selinux/hooks.c:5198:20: error: no member named 'lock' in 'struct sk_security_struct' 5198 | spin_lock(&sksec->lock); | ~~~~~ ^ security/selinux/hooks.c:5200:22: error: no member named 'lock' in 'struct sk_security_struct' 5200 | spin_unlock(&sksec->lock); | ~~~~~ ^ 4 errors generated. vim +4718 security/selinux/hooks.c 4695 4696 static int selinux_socket_post_create(struct socket *sock, int family, 4697 int type, int protocol, int kern) 4698 { 4699 const struct task_security_struct *tsec = selinux_cred(current_cred()); 4700 struct inode_security_struct *isec = inode_security_novalidate(SOCK_INODE(sock)); 4701 struct sk_security_struct *sksec; 4702 u16 sclass = socket_type_to_security_class(family, type, protocol); 4703 u32 sid = SECINITSID_KERNEL; 4704 int err = 0; 4705 4706 if (!kern) { 4707 err = socket_sockcreate_sid(tsec, sclass, &sid); 4708 if (err) 4709 return err; 4710 } 4711 4712 isec->sclass = sclass; 4713 isec->sid = sid; 4714 isec->initialized = LABEL_INITIALIZED; 4715 4716 if (sock->sk) { 4717 sksec = selinux_sock(sock->sk); > 4718 spin_lock(&sksec->lock); 4719 sksec->sclass = sclass; 4720 sksec->sid = sid; 4721 spin_unlock(&sksec->lock); 4722 /* Allows detection of the first association on this socket */ 4723 if (sksec->sclass == SECCLASS_SCTP_SOCKET) 4724 sksec->sctp_assoc_state = SCTP_ASSOC_UNSET; 4725 4726 err = selinux_netlbl_socket_post_create(sock->sk, family); 4727 } 4728 4729 return err; 4730 } 4731 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki