All of lore.kernel.org
 help / color / mirror / Atom feed
* [isilence:zc/rx-v4-dmamap 914/923] io_uring/zc_rx.c:224:13: error: implicit declaration of function 'io_file_need_scm'
@ 2024-03-01  8:22 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-01  8:22 UTC (permalink / raw)
  To: Pavel Begunkov; +Cc: oe-kbuild-all

tree:   https://github.com/isilence/linux zc/rx-v4-dmamap
head:   a25700398698f032509948d0bdc60ad210a8590a
commit: ab1d3b45c1a77979ac37c8c1ed6db2cfc14cc217 [914/923] io_uring/zcrx: implement socket registration
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240301/202403011641.JSfilvH0-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240301/202403011641.JSfilvH0-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/202403011641.JSfilvH0-lkp@intel.com/

Note: the isilence/zc/rx-v4-dmamap HEAD a25700398698f032509948d0bdc60ad210a8590a builds fine.
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   io_uring/zc_rx.c: In function 'io_register_zc_rx_sock':
>> io_uring/zc_rx.c:224:13: error: implicit declaration of function 'io_file_need_scm' [-Werror=implicit-function-declaration]
     224 |         if (io_file_need_scm(file)) {
         |             ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/io_file_need_scm +224 io_uring/zc_rx.c

   196	
   197	int io_register_zc_rx_sock(struct io_ring_ctx *ctx,
   198				   struct io_uring_zc_rx_sock_reg __user *arg)
   199	{
   200		struct io_uring_zc_rx_sock_reg sr;
   201		struct io_zc_rx_ifq *ifq;
   202		struct socket *sock;
   203		struct file *file;
   204		int ret = -EEXIST;
   205		int idx;
   206	
   207		if (copy_from_user(&sr, arg, sizeof(sr)))
   208			return -EFAULT;
   209		if (sr.__resv[0] || sr.__resv[1])
   210			return -EINVAL;
   211		if (sr.zc_rx_ifq_idx != 0 || !ctx->ifq)
   212			return -EINVAL;
   213	
   214		ifq = ctx->ifq;
   215		if (ifq->nr_sockets >= ARRAY_SIZE(ifq->sockets))
   216			return -EINVAL;
   217	
   218		BUILD_BUG_ON(ARRAY_SIZE(ifq->sockets) > IO_ZC_IFQ_IDX_MASK);
   219	
   220		file = fget(sr.sockfd);
   221		if (!file)
   222			return -EBADF;
   223	
 > 224		if (io_file_need_scm(file)) {
   225			fput(file);
   226			return -EBADF;
   227		}
   228	
   229		sock = sock_from_file(file);
   230		if (unlikely(!sock || !sock->sk)) {
   231			fput(file);
   232			return -ENOTSOCK;
   233		}
   234	
   235		idx = ifq->nr_sockets;
   236		lock_sock(sock->sk);
   237		if (!sock->zc_rx_idx) {
   238			unsigned token;
   239	
   240			token = idx + (sr.zc_rx_ifq_idx << IO_ZC_IFQ_IDX_OFFSET);
   241			WRITE_ONCE(sock->zc_rx_idx, token);
   242			ret = 0;
   243		}
   244		release_sock(sock->sk);
   245	
   246		if (ret) {
   247			fput(file);
   248			return ret;
   249		}
   250		ifq->sockets[idx] = file;
   251		ifq->nr_sockets++;
   252		return 0;
   253	}
   254	

-- 
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:[~2024-03-01  8:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01  8:22 [isilence:zc/rx-v4-dmamap 914/923] io_uring/zc_rx.c:224:13: error: implicit declaration of function 'io_file_need_scm' 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.