On Wed, Sep 10, 2025 at 4:58 AM kernel test robot <lkp@xxxxxxxxx> wrote: > > Hi Kuniyuki, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on bpf-next/net] > > url: https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/tcp-Save-lock_sock-for-memcg-in-inet_csk_accept/20250910-044928 > base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net > patch link: https://lore.kernel.org/r/20250909204632.3994767-4-kuniyu%40google.com > patch subject: [PATCH v7 bpf-next/net 3/6] net-memcg: Introduce net.core.memcg_exclusive sysctl. > config: um-randconfig-001-20250910 (https://download.01.org/0day-ci/archive/20250910/202509101912.ROjtP2uL-lkp@xxxxxxxxx/config) > compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 7fb1dc08d2f025aad5777bb779dfac1197e9ef87) > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250910/202509101912.ROjtP2uL-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/202509101912.ROjtP2uL-lkp@xxxxxxxxx/ > > All errors (new ones prefixed by >>): > > /usr/bin/ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions > /usr/bin/ld: mm/memcontrol.o: in function `mem_cgroup_sk_set': > >> memcontrol.c:(.text+0xa1e0): undefined reference to `init_net' > clang: error: linker command failed with exit code 1 (use -v to see invocation) CONFIG_NET=n... will fix it in v8. diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 0d017c8b8a00..b7d405b57e23 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5002,8 +5002,10 @@ static void mem_cgroup_sk_set(struct sock *sk, struct mem_cgroup *memcg) sk->sk_memcg = memcg; +#ifdef CONFIG_NET if (READ_ONCE(sock_net(sk)->core.sysctl_memcg_exclusive)) mem_cgroup_sk_set_flags(sk, SK_MEMCG_EXCLUSIVE); +#endif } void mem_cgroup_sk_alloc(struct sock *sk)