Re: [PATCH bpf-next 2/6] bpf: Add syscall common attrs support for xdp link_create
From: kernel test robot
Date: Sat Oct 17 2026 - 23:29:11 EST
Hi Leon,
kernel test robot noticed the following build errors:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Leon-Hwang/bpf-Add-syscall-common-attrs-support-for-link_create/20261017-222644
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20261017142649.51047-3-leon.hwang%40linux.dev
patch subject: [PATCH bpf-next 2/6] bpf: Add syscall common attrs support for xdp link_create
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20261018/202610181150.jL2DnHl7-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261018/202610181150.jL2DnHl7-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/202610181150.jL2DnHl7-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
/usr/bin/ld: net/core/dev.o: in function `bpf_xdp_link_attach':
>> net/core/dev.c:10789:(.text+0x96f9): undefined reference to `bpf_log'
collect2: error: ld returned 1 exit status
vim +10789 net/core/dev.c
10774
10775 int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog,
10776 struct bpf_verifier_log *log)
10777 {
10778 struct net *net = current->nsproxy->net_ns;
10779 struct bpf_link_primer link_primer;
10780 struct netlink_ext_ack extack = {};
10781 struct bpf_xdp_link *link;
10782 struct net_device *dev;
10783 int err, fd;
10784
10785 rtnl_lock();
10786 dev = dev_get_by_index(net, attr->link_create.target_ifindex);
10787 if (!dev) {
10788 rtnl_unlock();
10789 bpf_log(log, "Invalid target_ifindex.\n");
10790 return -EINVAL;
10791 }
10792
10793 link = kzalloc_obj(*link, GFP_USER);
10794 if (!link) {
10795 err = -ENOMEM;
10796 goto unlock;
10797 }
10798
10799 bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog,
10800 attr->link_create.attach_type);
10801 link->dev = dev;
10802 link->flags = attr->link_create.flags;
10803
10804 err = bpf_link_prime(&link->link, &link_primer);
10805 if (err) {
10806 kfree(link);
10807 goto unlock;
10808 }
10809
10810 netdev_lock_ops(dev);
10811 err = dev_xdp_attach_link(dev, &extack, link);
10812 netdev_unlock_ops(dev);
10813 rtnl_unlock();
10814
10815 if (err) {
10816 link->dev = NULL;
10817 bpf_link_cleanup(&link_primer);
10818 bpf_log(log, extack._msg);
10819 trace_bpf_xdp_link_attach_failed(extack._msg);
10820 goto out_put_dev;
10821 }
10822
10823 fd = bpf_link_settle(&link_primer);
10824 /* link itself doesn't hold dev's refcnt to not complicate shutdown */
10825 dev_put(dev);
10826 return fd;
10827
10828 unlock:
10829 rtnl_unlock();
10830
10831 out_put_dev:
10832 dev_put(dev);
10833 return err;
10834 }
10835
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki