From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:zc/rx-v4-dmamap 914/923] io_uring/zc_rx.c:224:13: error: implicit declaration of function 'io_file_need_scm'
Date: Fri, 1 Mar 2024 16:22:18 +0800 [thread overview]
Message-ID: <202403011641.JSfilvH0-lkp@intel.com> (raw)
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
reply other threads:[~2024-03-01 8:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202403011641.JSfilvH0-lkp@intel.com \
--to=lkp@intel.com \
--cc=asml.silence@gmail.com \
--cc=oe-kbuild-all@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.