All of lore.kernel.org
 help / color / mirror / Atom feed
* [axboe-block:io_uring-6.14 8/8] io_uring/io_uring.c:321:8: error: no member named 'init' in 'io_async_msghdr'
@ 2025-01-23  6:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-23  6:49 UTC (permalink / raw)
  To: Jens Axboe; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git io_uring-6.14
head:   eaf99654a6373a5807ec91dad44f828454a5c218
commit: eaf99654a6373a5807ec91dad44f828454a5c218 [8/8] io_uring: get rid of alloc cache init_once handling
config: i386-buildonly-randconfig-002-20250123 (https://download.01.org/0day-ci/archive/20250123/202501231409.sM2oidck-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250123/202501231409.sM2oidck-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/202501231409.sM2oidck-lkp@intel.com/

All errors (new ones prefixed by >>):

>> io_uring/io_uring.c:321:8: error: no member named 'init' in 'io_async_msghdr'
     321 |                             offsetof(struct io_async_msghdr, init));
         |                             ^                                ~~~~
   include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^                        ~~~~~~
   1 error generated.


vim +321 io_uring/io_uring.c

   284	
   285	static __cold struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)
   286	{
   287		struct io_ring_ctx *ctx;
   288		int hash_bits;
   289		bool ret;
   290	
   291		ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
   292		if (!ctx)
   293			return NULL;
   294	
   295		xa_init(&ctx->io_bl_xa);
   296	
   297		/*
   298		 * Use 5 bits less than the max cq entries, that should give us around
   299		 * 32 entries per hash list if totally full and uniformly spread, but
   300		 * don't keep too many buckets to not overconsume memory.
   301		 */
   302		hash_bits = ilog2(p->cq_entries) - 5;
   303		hash_bits = clamp(hash_bits, 1, 8);
   304		if (io_alloc_hash_table(&ctx->cancel_table, hash_bits))
   305			goto err;
   306		if (percpu_ref_init(&ctx->refs, io_ring_ctx_ref_free,
   307				    0, GFP_KERNEL))
   308			goto err;
   309	
   310		ctx->flags = p->flags;
   311		ctx->hybrid_poll_time = LLONG_MAX;
   312		atomic_set(&ctx->cq_wait_nr, IO_CQ_WAKE_INIT);
   313		init_waitqueue_head(&ctx->sqo_sq_wait);
   314		INIT_LIST_HEAD(&ctx->sqd_list);
   315		INIT_LIST_HEAD(&ctx->cq_overflow_list);
   316		INIT_LIST_HEAD(&ctx->io_buffers_cache);
   317		ret = io_alloc_cache_init(&ctx->apoll_cache, IO_POLL_ALLOC_CACHE_MAX,
   318				    sizeof(struct async_poll), 0);
   319		ret |= io_alloc_cache_init(&ctx->netmsg_cache, IO_ALLOC_CACHE_MAX,
   320				    sizeof(struct io_async_msghdr),
 > 321				    offsetof(struct io_async_msghdr, init));
   322		ret |= io_alloc_cache_init(&ctx->rw_cache, IO_ALLOC_CACHE_MAX,
   323				    sizeof(struct io_async_rw),
   324				    offsetof(struct io_async_rw, init));
   325		ret |= io_alloc_cache_init(&ctx->uring_cache, IO_ALLOC_CACHE_MAX,
   326				    sizeof(struct io_uring_cmd_data),
   327				    offsetof(struct io_uring_cmd_data, init));
   328		spin_lock_init(&ctx->msg_lock);
   329		ret |= io_alloc_cache_init(&ctx->msg_cache, IO_ALLOC_CACHE_MAX,
   330				    sizeof(struct io_kiocb), 0);
   331		ret |= io_futex_cache_init(ctx);
   332		if (ret)
   333			goto free_ref;
   334		init_completion(&ctx->ref_comp);
   335		xa_init_flags(&ctx->personalities, XA_FLAGS_ALLOC1);
   336		mutex_init(&ctx->uring_lock);
   337		init_waitqueue_head(&ctx->cq_wait);
   338		init_waitqueue_head(&ctx->poll_wq);
   339		spin_lock_init(&ctx->completion_lock);
   340		raw_spin_lock_init(&ctx->timeout_lock);
   341		INIT_WQ_LIST(&ctx->iopoll_list);
   342		INIT_LIST_HEAD(&ctx->io_buffers_comp);
   343		INIT_LIST_HEAD(&ctx->defer_list);
   344		INIT_LIST_HEAD(&ctx->timeout_list);
   345		INIT_LIST_HEAD(&ctx->ltimeout_list);
   346		init_llist_head(&ctx->work_llist);
   347		INIT_LIST_HEAD(&ctx->tctx_list);
   348		ctx->submit_state.free_list.next = NULL;
   349		INIT_HLIST_HEAD(&ctx->waitid_list);
   350	#ifdef CONFIG_FUTEX
   351		INIT_HLIST_HEAD(&ctx->futex_list);
   352	#endif
   353		INIT_DELAYED_WORK(&ctx->fallback_work, io_fallback_req_func);
   354		INIT_WQ_LIST(&ctx->submit_state.compl_reqs);
   355		INIT_HLIST_HEAD(&ctx->cancelable_uring_cmd);
   356		io_napi_init(ctx);
   357		mutex_init(&ctx->mmap_lock);
   358	
   359		return ctx;
   360	
   361	free_ref:
   362		percpu_ref_exit(&ctx->refs);
   363	err:
   364		io_alloc_cache_free(&ctx->apoll_cache, kfree);
   365		io_alloc_cache_free(&ctx->netmsg_cache, io_netmsg_cache_free);
   366		io_alloc_cache_free(&ctx->rw_cache, io_rw_cache_free);
   367		io_alloc_cache_free(&ctx->uring_cache, kfree);
   368		io_alloc_cache_free(&ctx->msg_cache, kfree);
   369		io_futex_cache_free(ctx);
   370		kvfree(ctx->cancel_table.hbs);
   371		xa_destroy(&ctx->io_bl_xa);
   372		kfree(ctx);
   373		return NULL;
   374	}
   375	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-23  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23  6:49 [axboe-block:io_uring-6.14 8/8] io_uring/io_uring.c:321:8: error: no member named 'init' in 'io_async_msghdr' kernel test robot

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.