Re: [PATCH v1 bpf-next/net 2/8] bpf: Add a bpf hook in __inet_accept().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/20250823-062322
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net
patch link:    https://lore.kernel.org/r/20250822221846.744252-3-kuniyu%40google.com
patch subject: [PATCH v1 bpf-next/net 2/8] bpf: Add a bpf hook in __inet_accept().
config: x86_64-buildonly-randconfig-001-20250823 (https://download.01.org/0day-ci/archive/20250823/202508231842.8DrS8EwE-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250823/202508231842.8DrS8EwE-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/202508231842.8DrS8EwE-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   net/ipv4/af_inet.c: In function '__inet_accept':
>> net/ipv4/af_inet.c:766:9: error: implicit declaration of function 'BPF_CGROUP_RUN_PROG_INET_SOCK_ACCEPT'; did you mean 'BPF_CGROUP_RUN_PROG_INET_SOCK_RELEASE'? [-Werror=implicit-function-declaration]
     766 |         BPF_CGROUP_RUN_PROG_INET_SOCK_ACCEPT(newsk);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         BPF_CGROUP_RUN_PROG_INET_SOCK_RELEASE
   cc1: some warnings being treated as errors


vim +766 net/ipv4/af_inet.c

   753	
   754	void __inet_accept(struct socket *sock, struct socket *newsock, struct sock *newsk)
   755	{
   756		gfp_t gfp = GFP_KERNEL | __GFP_NOFAIL;
   757	
   758		/* TODO: use sk_clone_lock() in SCTP and remove protocol checks */
   759		if (mem_cgroup_sockets_enabled &&
   760		    (!IS_ENABLED(CONFIG_IP_SCTP) ||
   761		     sk_is_tcp(newsk) || sk_is_mptcp(newsk))) {
   762			mem_cgroup_sk_alloc(newsk);
   763			kmem_cache_charge(newsk, gfp);
   764		}
   765	
 > 766		BPF_CGROUP_RUN_PROG_INET_SOCK_ACCEPT(newsk);
   767	
   768		if (mem_cgroup_sk_enabled(newsk)) {
   769			int amt;
   770	
   771			/* The socket has not been accepted yet, no need
   772			 * to look at newsk->sk_wmem_queued.
   773			 */
   774			amt = sk_mem_pages(newsk->sk_forward_alloc +
   775					   atomic_read(&newsk->sk_rmem_alloc));
   776			if (amt)
   777				mem_cgroup_sk_charge(newsk, amt, gfp);
   778		}
   779	
   780		sock_rps_record_flow(newsk);
   781		WARN_ON(!((1 << newsk->sk_state) &
   782			  (TCPF_ESTABLISHED | TCPF_SYN_RECV |
   783			   TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 |
   784			   TCPF_CLOSING | TCPF_CLOSE_WAIT |
   785			   TCPF_CLOSE)));
   786	
   787		if (test_bit(SOCK_SUPPORT_ZC, &sock->flags))
   788			set_bit(SOCK_SUPPORT_ZC, &newsock->flags);
   789		sock_graft(newsk, newsock);
   790	
   791		newsock->state = SS_CONNECTED;
   792	}
   793	

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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux