From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v6 bpf] xsk: fix immature cq descriptor production
Date: Thu, 28 Aug 2025 07:11:29 +0800 [thread overview]
Message-ID: <202508280638.Dy15CCOf-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250820154416.2248012-1-maciej.fijalkowski@intel.com>
References: <20250820154416.2248012-1-maciej.fijalkowski@intel.com>
TO: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
TO: bpf@vger.kernel.org
TO: ast@kernel.org
TO: daniel@iogearbox.net
TO: andrii@kernel.org
CC: netdev@vger.kernel.org
CC: magnus.karlsson@intel.com
CC: stfomichev@gmail.com
CC: aleksander.lobakin@intel.com
CC: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
CC: Eryk Kubanski <e.kubanski@partner.samsung.com>
Hi Maciej,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bpf/master]
url: https://github.com/intel-lab-lkp/linux/commits/Maciej-Fijalkowski/xsk-fix-immature-cq-descriptor-production/20250820-235001
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
patch link: https://lore.kernel.org/r/20250820154416.2248012-1-maciej.fijalkowski%40intel.com
patch subject: [PATCH v6 bpf] xsk: fix immature cq descriptor production
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: powerpc-randconfig-r072-20250827 (https://download.01.org/0day-ci/archive/20250828/202508280638.Dy15CCOf-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 8.5.0
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202508280638.Dy15CCOf-lkp@intel.com/
smatch warnings:
net/xdp/xsk.c:662 xsk_build_skb_zerocopy() error: use kfree_skb() here instead of kfree(skb)
vim +662 net/xdp/xsk.c
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 638
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 639 static struct sk_buff *xsk_build_skb_zerocopy(struct xdp_sock *xs,
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 640 struct xdp_desc *desc)
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 641 {
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 642 struct xsk_buff_pool *pool = xs->pool;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 643 u32 hr, len, ts, offset, copy, copied;
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 644 struct xsk_addrs *addrs = NULL;
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 645 struct sk_buff *skb = xs->skb;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 646 struct page *page;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 647 void *buffer;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 648 int err, i;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 649 u64 addr;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 650
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 651 if (!skb) {
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 652 hr = max(NET_SKB_PAD, L1_CACHE_ALIGN(xs->dev->needed_headroom));
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 653
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 654 skb = sock_alloc_send_skb(&xs->sk, hr, 1, &err);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 655 if (unlikely(!skb))
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 656 return ERR_PTR(err);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 657
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 658 skb_reserve(skb, hr);
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 659
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 660 addrs = kmem_cache_zalloc(xsk_tx_generic_cache, GFP_KERNEL);
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 661 if (!addrs) {
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 @662 kfree(skb);
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 663 return ERR_PTR(-ENOMEM);
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 664 }
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 665
b3a8246d6ffa300 Maciej Fijalkowski 2025-08-20 666 xsk_set_destructor_arg(skb, addrs);
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 667 }
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 668
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 669 addr = desc->addr;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 670 len = desc->len;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 671 ts = pool->unaligned ? len : pool->chunk_size;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 672
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 673 buffer = xsk_buff_raw_get_data(pool, addr);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 674 offset = offset_in_page(buffer);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 675 addr = buffer - pool->addrs;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 676
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 677 for (copied = 0, i = skb_shinfo(skb)->nr_frags; copied < len; i++) {
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 678 if (unlikely(i >= MAX_SKB_FRAGS))
9d0a67b9d42c630 Tirthendu Sarkar 2023-08-23 679 return ERR_PTR(-EOVERFLOW);
cf24f5a5feeaae3 Tirthendu Sarkar 2023-07-19 680
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 681 page = pool->umem->pgs[addr >> PAGE_SHIFT];
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 682 get_page(page);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 683
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 684 copy = min_t(u32, PAGE_SIZE - offset, len - copied);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 685 skb_fill_page_desc(skb, i, page, offset, copy);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 686
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 687 copied += copy;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 688 addr += copy;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 689 offset = 0;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 690 }
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 691
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 692 skb->len += len;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 693 skb->data_len += len;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 694 skb->truesize += ts;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 695
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 696 refcount_add(ts, &xs->sk.sk_wmem_alloc);
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 697
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 698 return skb;
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 699 }
9c8f21e6f8856a9 Xuan Zhuo 2021-02-18 700
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-08-27 23:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 23:11 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-20 15:44 [PATCH v6 bpf] xsk: fix immature cq descriptor production Maciej Fijalkowski
2025-08-20 17:06 ` Stanislav Fomichev
2025-08-22 16:20 ` patchwork-bot+netdevbpf
2025-08-26 8:14 ` Dan Carpenter
2025-08-26 12:23 ` Daniel Borkmann
2025-08-26 13:40 ` Jason Xing
2025-08-29 16:14 ` Maciej Fijalkowski
2025-08-30 10:32 ` Jason Xing
2025-08-26 16:00 ` Jason Xing
2025-08-26 18:23 ` Magnus Karlsson
2025-08-26 19:03 ` Maciej Fijalkowski
2025-08-26 19:13 ` Maciej Fijalkowski
2025-08-27 0:25 ` Jason Xing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202508280638.Dy15CCOf-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.