Skip to contentSkip to conversation

io_uring/zcrx.c:385 io_zcrx_free_area() error: we previously assumed 'area->ifq' could be null (see line 380)

PATCH kernel test robot 1 participant 1 message Jul 17, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

BCC: [email protected]
CC: [email protected]
TO: Pavel Begunkov <[email protected]>
CC: Jens Axboe <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   024e09e444bd2b06aee9d1f3fe7b313c7a2df1bb
commit: 262ab205180d2ba3ab6110899a4dbe439c51dfaa [10555/10823] io_uring/zcrx: account area memory

:::::: branch date: 13 hours ago
:::::: commit date: 24 hours ago
config: x86_64-randconfig-161-20250717 (https://download.01.org/0day-ci/archive/20250718/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)

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 <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

smatch warnings:
io_uring/zcrx.c:385 io_zcrx_free_area() error: we previously assumed 'area->ifq' could be null (see line 380)

vim +385 io_uring/zcrx.c

6f377873cb2390 David Wei      2025-02-14  377  
cf96310c5f9a0d David Wei      2025-02-14  378  static void io_zcrx_free_area(struct io_zcrx_area *area)
cf96310c5f9a0d David Wei      2025-02-14  379  {
0ec33c81d9c734 Pavel Begunkov 2025-05-27 @380  	if (area->ifq)
db070446f5af8c Pavel Begunkov 2025-02-14  381  		io_zcrx_unmap_area(area->ifq, area);
782dfa329ac9d1 Pavel Begunkov 2025-05-01  382  	io_release_area_mem(&area->mem);
db070446f5af8c Pavel Begunkov 2025-02-14  383  
262ab205180d2b Pavel Begunkov 2025-07-16  384  	if (area->mem.account_pages)
262ab205180d2b Pavel Begunkov 2025-07-16 @385  		io_unaccount_mem(area->ifq->ctx, area->mem.account_pages);
262ab205180d2b Pavel Begunkov 2025-07-16  386  
cf96310c5f9a0d David Wei      2025-02-14  387  	kvfree(area->freelist);
cf96310c5f9a0d David Wei      2025-02-14  388  	kvfree(area->nia.niovs);
34a3e60821ab9f Pavel Begunkov 2025-02-14  389  	kvfree(area->user_refs);
cf96310c5f9a0d David Wei      2025-02-14  390  	kfree(area);
cf96310c5f9a0d David Wei      2025-02-14  391  }
cf96310c5f9a0d David Wei      2025-02-14  392  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki