From: kernel test robot <lkp@intel.com>
To: "Nikhil P. Rao" <nikhil.rao@amd.com>, netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
nikhil.rao@amd.com, magnus.karlsson@intel.com,
maciej.fijalkowski@intel.com, sdf@fomichev.me,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, kerneljasonxing@gmail.com
Subject: Re: [PATCH net v3 2/2] xsk: Fix zero-copy AF_XDP fragment drop
Date: Tue, 17 Feb 2026 20:39:19 +0800 [thread overview]
Message-ID: <202602172046.vf9DtpdF-lkp@intel.com> (raw)
In-Reply-To: <20260217012346.22468-3-nikhil.rao@amd.com>
Hi Nikhil,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Nikhil-P-Rao/xsk-Fix-fragment-node-deletion-to-prevent-buffer-leak/20260217-092448
base: net/main
patch link: https://lore.kernel.org/r/20260217012346.22468-3-nikhil.rao%40amd.com
patch subject: [PATCH net v3 2/2] xsk: Fix zero-copy AF_XDP fragment drop
config: powerpc64-randconfig-002-20260217 (https://download.01.org/0day-ci/archive/20260217/202602172046.vf9DtpdF-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e86750b29fa0ff207cd43213d66dabe565417638)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260217/202602172046.vf9DtpdF-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602172046.vf9DtpdF-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> net/xdp/xsk.c:183:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
183 | if (xskq_prod_nb_free(xs->rx, num_desc) < num_desc) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/xdp/xsk.c:201:9: note: uninitialized use occurs here
201 | return err;
| ^~~
net/xdp/xsk.c:183:2: note: remove the 'if' if its condition is always false
183 | if (xskq_prod_nb_free(xs->rx, num_desc) < num_desc) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184 | xs->rx_queue_full++;
| ~~~~~~~~~~~~~~~~~~~~
185 | goto err;
| ~~~~~~~~~
186 | }
| ~
net/xdp/xsk.c:171:9: note: initialize the variable 'err' to silence this warning
171 | int err;
| ^
| = 0
1 warning generated.
vim +183 net/xdp/xsk.c
162
163 static int xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len)
164 {
165 struct xdp_buff_xsk *xskb = container_of(xdp, struct xdp_buff_xsk, xdp);
166 u32 frags = xdp_buff_has_frags(xdp);
167 struct xdp_buff_xsk *pos, *tmp;
168 struct list_head *xskb_list;
169 u32 contd = 0;
170 u32 num_desc;
171 int err;
172
173 if (frags) {
174 num_desc = xdp_get_shared_info_from_buff(xdp)->nr_frags + 1;
175 contd = XDP_PKT_CONTD;
176 } else {
177 err = __xsk_rcv_zc(xs, xskb, len, contd);
178 if (err)
179 goto err;
180 return 0;
181 }
182
> 183 if (xskq_prod_nb_free(xs->rx, num_desc) < num_desc) {
184 xs->rx_queue_full++;
185 goto err;
186 }
187
188 __xsk_rcv_zc(xs, xskb, len, contd);
189 xskb_list = &xskb->pool->xskb_list;
190 list_for_each_entry_safe(pos, tmp, xskb_list, list_node) {
191 if (list_is_singular(xskb_list))
192 contd = 0;
193 len = pos->xdp.data_end - pos->xdp.data;
194 __xsk_rcv_zc(xs, pos, len, contd);
195 list_del_init(&pos->list_node);
196 }
197
198 return 0;
199 err:
200 xsk_buff_free(xdp);
201 return err;
202 }
203
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-02-17 12:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 1:22 [PATCH net v3 0/2] xsk: Fixes for AF_XDP fragment handling Nikhil P. Rao
2026-02-17 1:22 ` [PATCH net v3 1/2] xsk: Fix fragment node deletion to prevent buffer leak Nikhil P. Rao
2026-02-17 1:22 ` [PATCH net v3 2/2] xsk: Fix zero-copy AF_XDP fragment drop Nikhil P. Rao
2026-02-17 11:11 ` Maciej Fijalkowski
2026-02-17 12:39 ` kernel test robot [this message]
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=202602172046.vf9DtpdF-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nikhil.rao@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox