[linux-next:master 4153/5413] drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21: error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ba5b053ab3ac674b91a6669086139819359a5e6e
commit: 5ec55823438e850c91c6b92aec93fb04ebde29e2 [4153/5413] net: stmmac: add clocks management for gmac driver
config: ia64-randconfig-r031-20210318 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 5ec55823438e850c91c6b92aec93fb04ebde29e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/compat.h:17,
from include/linux/ethtool.h:17,
from include/linux/phy.h:16,
from include/linux/of_net.h:9,
from drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:15:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from include/linux/device.h:25,
from include/linux/platform_device.h:13,
from drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:11:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: At top level:
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21: error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean 'stmmac_suspend'?
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:342:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
342 | .runtime_suspend = suspend_fn, \
| ^~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:45: error: 'stmmac_runtime_resume' undeclared here (not in a function)
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/pm.h:343:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
343 | .runtime_resume = resume_fn, \
| ^~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +769 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
766
767 const struct dev_pm_ops stmmac_pltfr_pm_ops = {
768 SET_SYSTEM_SLEEP_PM_OPS(stmmac_pltfr_suspend, stmmac_pltfr_resume)
> 769 SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
770 };
771 EXPORT_SYMBOL_GPL(stmmac_pltfr_pm_ops);
772
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 64/74] fs/io_uring.c:3462:8: error: use of undeclared label 'out_free'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 107abcc47e3a96c38ab38e48dbd55f19c0a1c257 [64/74] io_uring: inline io_read()'s iovec freeing
config: powerpc-randconfig-r002-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 107abcc47e3a96c38ab38e48dbd55f19c0a1c257
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> fs/io_uring.c:3462:8: error: use of undeclared label 'out_free'
goto out_free;
^
fs/io_uring.c:3427:8: error: use of undeclared label 'copy_iov'
goto copy_iov;
^
fs/io_uring.c:4266:22: error: use of undeclared identifier 'IO_WQ_WORK_NO_CANCEL'; did you mean 'IO_WQ_WORK_CANCEL'?
req->work.flags |= IO_WQ_WORK_NO_CANCEL;
^~~~~~~~~~~~~~~~~~~~
IO_WQ_WORK_CANCEL
fs/io-wq.h:9:2: note: 'IO_WQ_WORK_CANCEL' declared here
IO_WQ_WORK_CANCEL = 1,
^
fs/io_uring.c:6091:3: error: implicit declaration of function 'io_req_task_work_add_fallback' [-Werror,-Wimplicit-function-declaration]
io_req_task_work_add_fallback(req, io_req_task_cancel);
^
fs/io_uring.c:6091:3: note: did you mean 'io_req_task_work_add'?
fs/io_uring.c:2027:12: note: 'io_req_task_work_add' declared here
static int io_req_task_work_add(struct io_kiocb *req, bool twa_signal_ok)
^
fs/io_uring.c:6092:3: error: non-void function 'io_wq_submit_work' should return a value [-Wreturn-type]
return;
^
5 errors generated.
vim +/out_free +3462 fs/io_uring.c
f67676d160c6ee Jens Axboe 2019-12-02 3397
a1d7c393c4711a Jens Axboe 2020-06-22 3398 static int io_read(struct io_kiocb *req, bool force_nonblock,
a1d7c393c4711a Jens Axboe 2020-06-22 3399 struct io_comp_state *cs)
2b188cc1bb857a Jens Axboe 2019-01-07 3400 {
2b188cc1bb857a Jens Axboe 2019-01-07 3401 struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
9adbd45d6d32ff Jens Axboe 2019-12-20 3402 struct kiocb *kiocb = &req->rw.kiocb;
ff6165b2d7f66f Jens Axboe 2020-08-13 3403 struct iov_iter __iter, *iter = &__iter;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3404 struct io_async_rw *rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3405 ssize_t io_size, ret, ret2;
f5cac8b156e8b7 Jens Axboe 2020-09-14 3406 bool no_async;
ff6165b2d7f66f Jens Axboe 2020-08-13 3407
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3408 if (rw)
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3409 iter = &rw->iter;
2b188cc1bb857a Jens Axboe 2019-01-07 3410
ff6165b2d7f66f Jens Axboe 2020-08-13 3411 ret = io_import_iovec(READ, req, &iovec, iter, !force_nonblock);
f67676d160c6ee Jens Axboe 2019-12-02 3412 if (ret < 0)
2b188cc1bb857a Jens Axboe 2019-01-07 3413 return ret;
758adcb5e98092 Pavel Begunkov 2020-11-07 3414 io_size = iov_iter_count(iter);
fa15bafb71fd7a Pavel Begunkov 2020-08-01 3415 req->result = io_size;
227c0c9673d867 Jens Axboe 2020-08-13 3416 ret = 0;
2b188cc1bb857a Jens Axboe 2019-01-07 3417
fd6c2e4c063d64 Jens Axboe 2019-12-18 3418 /* Ensure we clear previously set non-block flag */
fd6c2e4c063d64 Jens Axboe 2019-12-18 3419 if (!force_nonblock)
29de5f6a350778 Jens Axboe 2020-02-20 3420 kiocb->ki_flags &= ~IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3421 else
a88fc400212fc1 Pavel Begunkov 2020-09-30 3422 kiocb->ki_flags |= IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3423
24c74678634b3c Pavel Begunkov 2020-06-21 3424 /* If the file doesn't support async, just async punt */
f5cac8b156e8b7 Jens Axboe 2020-09-14 3425 no_async = force_nonblock && !io_file_supports_async(req->file, READ);
f5cac8b156e8b7 Jens Axboe 2020-09-14 3426 if (no_async)
f67676d160c6ee Jens Axboe 2019-12-02 3427 goto copy_iov;
9e645e1105ca60 Jens Axboe 2019-05-10 3428
758adcb5e98092 Pavel Begunkov 2020-11-07 3429 ret = rw_verify_area(READ, req->file, io_kiocb_ppos(kiocb), io_size);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3430 if (unlikely(ret)) {
107abcc47e3a96 Pavel Begunkov 2021-02-04 3431 kfree(iovec);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3432 return ret;
107abcc47e3a96 Pavel Begunkov 2021-02-04 3433 }
2b188cc1bb857a Jens Axboe 2019-01-07 3434
227c0c9673d867 Jens Axboe 2020-08-13 3435 ret = io_iter_do_read(req, iter);
32960613b7c335 Jens Axboe 2019-09-23 3436
d964a45ff1644d Pavel Begunkov 2021-02-01 3437 if (ret == -EIOCBQUEUED) {
107abcc47e3a96 Pavel Begunkov 2021-02-04 3438 /* it's faster to check here then delegate to kfree */
107abcc47e3a96 Pavel Begunkov 2021-02-04 3439 if (iovec)
107abcc47e3a96 Pavel Begunkov 2021-02-04 3440 kfree(iovec);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3441 return 0;
227c0c9673d867 Jens Axboe 2020-08-13 3442 } else if (ret == -EAGAIN) {
eefdf30f3dcb5c Jens Axboe 2020-08-27 3443 /* IOPOLL retry should happen for io-wq threads */
eefdf30f3dcb5c Jens Axboe 2020-08-27 3444 if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL))
f91daf565b0e27 Jens Axboe 2020-08-15 3445 goto done;
355afaeb578aba Jens Axboe 2020-09-02 3446 /* no retry on NONBLOCK marked file */
355afaeb578aba Jens Axboe 2020-09-02 3447 if (req->file->f_flags & O_NONBLOCK)
355afaeb578aba Jens Axboe 2020-09-02 3448 goto done;
842163154b87b0 Jens Axboe 2020-08-24 3449 /* some cases will consume bytes even on error returns */
758adcb5e98092 Pavel Begunkov 2020-11-07 3450 iov_iter_revert(iter, io_size - iov_iter_count(iter));
f38c7e3abfba9a Jens Axboe 2020-09-25 3451 ret = 0;
82b6fe19520be5 Pavel Begunkov 2021-02-04 3452 } else if (ret <= 0 || ret == io_size || !force_nonblock ||
82b6fe19520be5 Pavel Begunkov 2021-02-04 3453 (req->file->f_flags & O_NONBLOCK) ||
82b6fe19520be5 Pavel Begunkov 2021-02-04 3454 !(req->flags & REQ_F_ISREG)) {
82b6fe19520be5 Pavel Begunkov 2021-02-04 3455 /* read all, failed, already did sync or don't want to retry */
00d23d516e2e79 Jens Axboe 2020-08-25 3456 goto done;
75a2698c924a90 Pavel Begunkov 2021-02-04 3457 }
75a2698c924a90 Pavel Begunkov 2021-02-04 3458
227c0c9673d867 Jens Axboe 2020-08-13 3459 ret2 = io_setup_async_rw(req, iovec, inline_vecs, iter, true);
227c0c9673d867 Jens Axboe 2020-08-13 3460 if (ret2) {
227c0c9673d867 Jens Axboe 2020-08-13 3461 ret = ret2;
227c0c9673d867 Jens Axboe 2020-08-13 @3462 goto out_free;
f67676d160c6ee Jens Axboe 2019-12-02 3463 }
f5cac8b156e8b7 Jens Axboe 2020-09-14 3464 if (no_async)
f5cac8b156e8b7 Jens Axboe 2020-09-14 3465 return -EAGAIN;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3466 rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3467 /* now use our persistent iterator, if we aren't already */
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3468 iter = &rw->iter;
227c0c9673d867 Jens Axboe 2020-08-13 3469 retry:
82b6fe19520be5 Pavel Begunkov 2021-02-04 3470 io_size -= ret;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3471 rw->bytes_done += ret;
227c0c9673d867 Jens Axboe 2020-08-13 3472 /* if we can retry, do so with the callbacks armed */
227c0c9673d867 Jens Axboe 2020-08-13 3473 if (!io_rw_should_retry(req)) {
bcf5a06304d69a Jens Axboe 2020-05-22 3474 kiocb->ki_flags &= ~IOCB_WAITQ;
f67676d160c6ee Jens Axboe 2019-12-02 3475 return -EAGAIN;
2b188cc1bb857a Jens Axboe 2019-01-07 3476 }
227c0c9673d867 Jens Axboe 2020-08-13 3477
227c0c9673d867 Jens Axboe 2020-08-13 3478 /*
227c0c9673d867 Jens Axboe 2020-08-13 3479 * Now retry read with the IOCB_WAITQ parts set in the iocb. If we
227c0c9673d867 Jens Axboe 2020-08-13 3480 * get -EIOCBQUEUED, then we'll get a notification when the desired
227c0c9673d867 Jens Axboe 2020-08-13 3481 * page gets unlocked. We can also get a partial read here, and if we
227c0c9673d867 Jens Axboe 2020-08-13 3482 * do, then just retry at the new offset.
227c0c9673d867 Jens Axboe 2020-08-13 3483 */
227c0c9673d867 Jens Axboe 2020-08-13 3484 ret = io_iter_do_read(req, iter);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3485 if (ret == -EIOCBQUEUED)
107abcc47e3a96 Pavel Begunkov 2021-02-04 3486 return 0;
227c0c9673d867 Jens Axboe 2020-08-13 3487 /* we got some bytes, but not all. retry. */
107abcc47e3a96 Pavel Begunkov 2021-02-04 3488 if (ret > 0 && ret < io_size)
227c0c9673d867 Jens Axboe 2020-08-13 3489 goto retry;
227c0c9673d867 Jens Axboe 2020-08-13 3490 done:
227c0c9673d867 Jens Axboe 2020-08-13 3491 kiocb_done(kiocb, ret, cs);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3492 return 0;
2b188cc1bb857a Jens Axboe 2019-01-07 3493 }
2b188cc1bb857a Jens Axboe 2019-01-07 3494
:::::: The code at line 3462 was first introduced by commit
:::::: 227c0c9673d86732995474d277f84e08ee763e46 io_uring: internally retry short reads
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 43/74] net/mptcp/options.c:492:6: error: redefinition of 'snd_data_fin_enable' with a different type: 'u64' (aka 'unsigned long long') vs 'bool' (aka '_Bool')
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 63fcde65bfac0ab04869d34b5a646c4ff769c258 [43/74] mptcp: fix DATA_FIN generation on early shutdown
config: x86_64-randconfig-a004-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 63fcde65bfac0ab04869d34b5a646c4ff769c258
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:266:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:273:15: note: expanded from macro '__unqual_scalar_typeof'
default: (x)))
^
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from net/mptcp/options.c:13:
net/mptcp/protocol.h:417:35: error: invalid operands to binary expression ('typeof (_Generic((msk->write_seq), char: (char)0, unsigned char: (unsigned char)0, signed char: (signed char)0, unsigned short: (unsigned short)0, short: (short)0, unsigned int: (unsigned int)0, int: (int)0, unsigned long: (unsigned long)0, long: (long)0, unsigned long long: (unsigned long long)0, long long: (long long)0, default: (msk->write_seq)))' (aka 'unsigned long long') and 'void')
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
>> net/mptcp/options.c:492:6: error: redefinition of 'snd_data_fin_enable' with a different type: 'u64' (aka 'unsigned long long') vs 'bool' (aka '_Bool')
u64 snd_data_fin_enable;
^
net/mptcp/options.c:484:13: note: previous definition is here
bool snd_data_fin_enable,
^
10 errors generated.
vim +492 net/mptcp/options.c
6d0060f600adfd Mat Martineau 2020-01-21 482
6d0060f600adfd Mat Martineau 2020-01-21 483 static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
63fcde65bfac0a Paolo Abeni 2021-02-19 484 bool snd_data_fin_enable,
6d0060f600adfd Mat Martineau 2020-01-21 485 unsigned int *size,
6d0060f600adfd Mat Martineau 2020-01-21 486 unsigned int remaining,
6d0060f600adfd Mat Martineau 2020-01-21 487 struct mptcp_out_options *opts)
6d0060f600adfd Mat Martineau 2020-01-21 488 {
6d0060f600adfd Mat Martineau 2020-01-21 489 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
7279da6145bbb2 Mat Martineau 2020-07-28 490 struct mptcp_sock *msk = mptcp_sk(subflow->conn);
6d0060f600adfd Mat Martineau 2020-01-21 491 unsigned int dss_size = 0;
7279da6145bbb2 Mat Martineau 2020-07-28 @492 u64 snd_data_fin_enable;
6d0060f600adfd Mat Martineau 2020-01-21 493 struct mptcp_ext *mpext;
6d0060f600adfd Mat Martineau 2020-01-21 494 unsigned int ack_size;
d22f4988ffecbe Christoph Paasch 2020-01-21 495 bool ret = false;
63fcde65bfac0a Paolo Abeni 2021-02-19 496 u64 ack_seq;
6d0060f600adfd Mat Martineau 2020-01-21 497
0bac966a1f2ae0 Mat Martineau 2020-07-28 498 mpext = skb ? mptcp_get_ext(skb) : NULL;
6d0060f600adfd Mat Martineau 2020-01-21 499
7279da6145bbb2 Mat Martineau 2020-07-28 500 if (!skb || (mpext && mpext->use_map) || snd_data_fin_enable) {
6d0060f600adfd Mat Martineau 2020-01-21 501 unsigned int map_size;
6d0060f600adfd Mat Martineau 2020-01-21 502
6d0060f600adfd Mat Martineau 2020-01-21 503 map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64;
6d0060f600adfd Mat Martineau 2020-01-21 504
6d0060f600adfd Mat Martineau 2020-01-21 505 remaining -= map_size;
6d0060f600adfd Mat Martineau 2020-01-21 506 dss_size = map_size;
6d0060f600adfd Mat Martineau 2020-01-21 507 if (mpext)
6d0060f600adfd Mat Martineau 2020-01-21 508 opts->ext_copy = *mpext;
6d0060f600adfd Mat Martineau 2020-01-21 509
7279da6145bbb2 Mat Martineau 2020-07-28 510 if (skb && snd_data_fin_enable)
9c29e36152748f Paolo Abeni 2020-07-03 511 mptcp_write_data_fin(subflow, skb, &opts->ext_copy);
d22f4988ffecbe Christoph Paasch 2020-01-21 512 ret = true;
d22f4988ffecbe Christoph Paasch 2020-01-21 513 }
d22f4988ffecbe Christoph Paasch 2020-01-21 514
2398e3991bda7c Paolo Abeni 2020-03-04 515 /* passive sockets msk will set the 'can_ack' after accept(), even
2398e3991bda7c Paolo Abeni 2020-03-04 516 * if the first subflow may have the already the remote key handy
2398e3991bda7c Paolo Abeni 2020-03-04 517 */
d22f4988ffecbe Christoph Paasch 2020-01-21 518 opts->ext_copy.use_ack = 0;
dc093db5cc052b Paolo Abeni 2020-03-13 519 if (!READ_ONCE(msk->can_ack)) {
d22f4988ffecbe Christoph Paasch 2020-01-21 520 *size = ALIGN(dss_size, 4);
d22f4988ffecbe Christoph Paasch 2020-01-21 521 return ret;
6d0060f600adfd Mat Martineau 2020-01-21 522 }
6d0060f600adfd Mat Martineau 2020-01-21 523
37198e93ced707 Davide Caratti 2020-10-06 524 if (READ_ONCE(msk->use_64bit_ack)) {
6d0060f600adfd Mat Martineau 2020-01-21 525 ack_size = TCPOLEN_MPTCP_DSS_ACK64;
917944da3bfc7c Mat Martineau 2020-09-29 526 opts->ext_copy.data_ack = READ_ONCE(msk->ack_seq);
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 527 opts->ext_copy.ack64 = 1;
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 528 } else {
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 529 ack_size = TCPOLEN_MPTCP_DSS_ACK32;
917944da3bfc7c Mat Martineau 2020-09-29 530 opts->ext_copy.data_ack32 = (uint32_t)READ_ONCE(msk->ack_seq);
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 531 opts->ext_copy.ack64 = 0;
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 532 }
a0c1d0eafd1ef1 Christoph Paasch 2020-05-14 533 opts->ext_copy.use_ack = 1;
6d0060f600adfd Mat Martineau 2020-01-21 534
6d0060f600adfd Mat Martineau 2020-01-21 535 /* Add kind/length/subtype/flag overhead if mapping is not populated */
6d0060f600adfd Mat Martineau 2020-01-21 536 if (dss_size == 0)
6d0060f600adfd Mat Martineau 2020-01-21 537 ack_size += TCPOLEN_MPTCP_DSS_BASE;
6d0060f600adfd Mat Martineau 2020-01-21 538
6d0060f600adfd Mat Martineau 2020-01-21 539 dss_size += ack_size;
6d0060f600adfd Mat Martineau 2020-01-21 540
6d0060f600adfd Mat Martineau 2020-01-21 541 *size = ALIGN(dss_size, 4);
6d0060f600adfd Mat Martineau 2020-01-21 542 return true;
6d0060f600adfd Mat Martineau 2020-01-21 543 }
6d0060f600adfd Mat Martineau 2020-01-21 544
:::::: The code at line 492 was first introduced by commit
:::::: 7279da6145bbb2e41a61def5d9bca5b65f12de9d mptcp: Use MPTCP-level flag for sending DATA_FIN
:::::: TO: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 42/74] net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 5dafb6beb289db849750d4a6f390e1a2bc2a85f6 [42/74] mptcp: refactor shutdown and close
config: x86_64-randconfig-a004-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 5dafb6beb289db849750d4a6f390e1a2bc2a85f6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:10: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:39: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:266:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:273:15: note: expanded from macro '__unqual_scalar_typeof'
default: (x)))
^
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from net/mptcp/mptcp_diag.c:14:
>> net/mptcp/protocol.h:417:35: error: invalid operands to binary expression ('typeof (_Generic((msk->write_seq), char: (char)0, unsigned char: (unsigned char)0, signed char: (signed char)0, unsigned short: (unsigned short)0, short: (short)0, unsigned int: (unsigned int)0, int: (int)0, unsigned long: (unsigned long)0, long: (long)0, unsigned long long: (unsigned long long)0, long long: (long long)0, default: (msk->write_seq)))' (aka 'unsigned long long') and 'void')
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
9 errors generated.
--
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:10: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:39: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:49:33: note: expanded from macro 'READ_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:48: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:266:13: note: expanded from macro '__unqual_scalar_typeof'
_Generic((x), \
^
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:65: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
include/linux/compiler_types.h:273:15: note: expanded from macro '__unqual_scalar_typeof'
default: (x)))
^
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:53: error: no member named 'snd_nxt' in 'struct mptcp_sock'
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~ ^
include/asm-generic/rwonce.h:50:14: note: expanded from macro 'READ_ONCE'
__READ_ONCE(x); \
^
include/asm-generic/rwonce.h:44:72: note: expanded from macro '__READ_ONCE'
#define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
^
In file included from net/mptcp/protocol.c:25:
>> net/mptcp/protocol.h:417:35: error: invalid operands to binary expression ('typeof (_Generic((msk->write_seq), char: (char)0, unsigned char: (unsigned char)0, signed char: (signed char)0, unsigned short: (unsigned short)0, short: (short)0, unsigned int: (unsigned int)0, int: (int)0, unsigned long: (unsigned long)0, long: (long)0, unsigned long long: (unsigned long long)0, long long: (long long)0, default: (msk->write_seq)))' (aka 'unsigned long long') and 'void')
READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
>> net/mptcp/protocol.c:1667:2: error: implicit declaration of function 'mptcp_schedule_work' [-Werror,-Wimplicit-function-declaration]
mptcp_schedule_work(sk);
^
>> net/mptcp/protocol.c:1746:3: error: implicit declaration of function '__tcp_close' [-Werror,-Wimplicit-function-declaration]
__tcp_close(ssk, 0);
^
net/mptcp/protocol.c:1746:3: note: did you mean 'tcp_close'?
include/net/tcp.h:395:6: note: 'tcp_close' declared here
void tcp_close(struct sock *sk, long timeout);
^
>> net/mptcp/protocol.c:2058:37: error: implicit declaration of function 'mptcp_send_head' [-Werror,-Wimplicit-function-declaration]
msk, msk->snd_data_fin_enable, !!mptcp_send_head(sk),
^
net/mptcp/protocol.c:2058:37: note: did you mean 'tcp_send_head'?
include/net/tcp.h:1788:31: note: 'tcp_send_head' declared here
static inline struct sk_buff *tcp_send_head(const struct sock *sk)
^
>> net/mptcp/protocol.c:2059:9: error: no member named 'snd_nxt' in 'struct mptcp_sock'
msk->snd_nxt, msk->write_seq);
~~~ ^
include/linux/printk.h:430:38: note: expanded from macro 'pr_debug'
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/printk.h:140:17: note: expanded from macro 'no_printk'
printk(fmt, ##__VA_ARGS__); \
^~~~~~~~~~~
net/mptcp/protocol.c:2064:40: error: no member named 'snd_nxt' in 'struct mptcp_sock'
if (!msk->snd_data_fin_enable || msk->snd_nxt + 1 != msk->write_seq ||
~~~ ^
net/mptcp/protocol.c:2065:6: error: implicit declaration of function 'mptcp_send_head' [-Werror,-Wimplicit-function-declaration]
mptcp_send_head(sk))
^
net/mptcp/protocol.c:2068:18: error: no member named 'snd_nxt' in 'struct mptcp_sock'
WRITE_ONCE(msk->snd_nxt, msk->write_seq);
~~~ ^
include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:10: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mptcp/protocol.c:2068:18: error: no member named 'snd_nxt' in 'struct mptcp_sock'
WRITE_ONCE(msk->snd_nxt, msk->write_seq);
~~~ ^
include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:277:39: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mptcp/protocol.c:2068:18: error: no member named 'snd_nxt' in 'struct mptcp_sock'
WRITE_ONCE(msk->snd_nxt, msk->write_seq);
~~~ ^
include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:10: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
net/mptcp/protocol.c:2068:18: error: no member named 'snd_nxt' in 'struct mptcp_sock'
WRITE_ONCE(msk->snd_nxt, msk->write_seq);
~~~ ^
include/asm-generic/rwonce.h:60:33: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:35: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:278:38: note: expanded from macro '__native_word'
sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
^
include/linux/compiler_types.h:315:22: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~
include/linux/compiler_types.h:303:23: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^~~~~~~~~
include/linux/compiler_types.h:295:9: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +417 net/mptcp/protocol.h
395
396 struct sock *mptcp_sk_clone(const struct sock *sk,
397 const struct mptcp_options_received *mp_opt,
398 struct request_sock *req);
399 void mptcp_get_options(const struct sk_buff *skb,
400 struct mptcp_options_received *mp_opt);
401
402 void mptcp_finish_connect(struct sock *sk);
403 static inline bool mptcp_is_fully_established(struct sock *sk)
404 {
405 return inet_sk_state_load(sk) == TCP_ESTABLISHED &&
406 READ_ONCE(mptcp_sk(sk)->fully_established);
407 }
408 void mptcp_rcv_space_init(struct mptcp_sock *msk, const struct sock *ssk);
409 void mptcp_data_ready(struct sock *sk, struct sock *ssk);
410 bool mptcp_finish_join(struct sock *sk);
411 void mptcp_data_acked(struct sock *sk);
412 void mptcp_subflow_eof(struct sock *sk);
413 bool mptcp_update_rcv_data_fin(struct mptcp_sock *msk, u64 data_fin_seq, bool use_64bit);
414 static inline bool mptcp_data_fin_enabled(const struct mptcp_sock *msk)
415 {
416 return READ_ONCE(msk->snd_data_fin_enable) &&
> 417 READ_ONCE(msk->write_seq) == READ_ONCE(msk->snd_nxt);
418 }
419
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 37/74] drivers/misc/mei/bus.c:62:6: error: use of undeclared identifier 'vtag'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 9af81b257c01533da218d79bbacf0b82febf4b26 [37/74] mei: bus: block send with vtag on non-conformat FW
config: x86_64-randconfig-a006-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 9af81b257c01533da218d79bbacf0b82febf4b26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/misc/mei/bus.c:62:6: error: use of undeclared identifier 'vtag'; did you mean 'stac'?
if (vtag) {
^~~~
stac
arch/x86/include/asm/smap.h:50:29: note: 'stac' declared here
static __always_inline void stac(void)
^
1 error generated.
vim +62 drivers/misc/mei/bus.c
22
23 /**
24 * __mei_cl_send - internal client send (write)
25 *
26 * @cl: host client
27 * @buf: buffer to send
28 * @length: buffer length
29 * @mode: sending mode
30 *
31 * Return: written size bytes or < 0 on error
32 */
33 ssize_t __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length,
34 unsigned int mode)
35 {
36 struct mei_device *bus;
37 struct mei_cl_cb *cb;
38 ssize_t rets;
39
40 if (WARN_ON(!cl || !cl->dev))
41 return -ENODEV;
42
43 bus = cl->dev;
44
45 mutex_lock(&bus->device_lock);
46 if (bus->dev_state != MEI_DEV_ENABLED) {
47 rets = -ENODEV;
48 goto out;
49 }
50
51 if (!mei_cl_is_connected(cl)) {
52 rets = -ENODEV;
53 goto out;
54 }
55
56 /* Check if we have an ME client device */
57 if (!mei_me_cl_is_active(cl->me_cl)) {
58 rets = -ENOTTY;
59 goto out;
60 }
61
> 62 if (vtag) {
63 /* Check if vtag is supported by client */
64 rets = mei_cl_vt_support_check(cl);
65 if (rets)
66 goto out;
67 }
68
69 if (length > mei_cl_mtu(cl)) {
70 rets = -EFBIG;
71 goto out;
72 }
73
74 while (cl->tx_cb_queued >= bus->tx_queue_limit) {
75 mutex_unlock(&bus->device_lock);
76 rets = wait_event_interruptible(cl->tx_wait,
77 cl->writing_state == MEI_WRITE_COMPLETE ||
78 (!mei_cl_is_connected(cl)));
79 mutex_lock(&bus->device_lock);
80 if (rets) {
81 if (signal_pending(current))
82 rets = -EINTR;
83 goto out;
84 }
85 if (!mei_cl_is_connected(cl)) {
86 rets = -ENODEV;
87 goto out;
88 }
89 }
90
91 cb = mei_cl_alloc_cb(cl, length, MEI_FOP_WRITE, NULL);
92 if (!cb) {
93 rets = -ENOMEM;
94 goto out;
95 }
96
97 cb->internal = !!(mode & MEI_CL_IO_TX_INTERNAL);
98 cb->blocking = !!(mode & MEI_CL_IO_TX_BLOCKING);
99 memcpy(cb->buf.data, buf, length);
100
101 rets = mei_cl_write(cl, cb);
102
103 out:
104 mutex_unlock(&bus->device_lock);
105
106 return rets;
107 }
108
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 64/74] fs/io_uring.c:3462:3: error: label 'out_free' used but not defined
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 107abcc47e3a96c38ab38e48dbd55f19c0a1c257 [64/74] io_uring: inline io_read()'s iovec freeing
config: parisc-randconfig-r004-20210318 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 107abcc47e3a96c38ab38e48dbd55f19c0a1c257
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/io_uring.c: In function 'io_prep_async_work':
fs/io_uring.c:1431:22: warning: variable 'id' set but not used [-Wunused-but-set-variable]
1431 | struct io_identity *id;
| ^~
fs/io_uring.c: In function 'io_read':
>> fs/io_uring.c:3462:3: error: label 'out_free' used but not defined
3462 | goto out_free;
| ^~~~
fs/io_uring.c:3427:3: error: label 'copy_iov' used but not defined
3427 | goto copy_iov;
| ^~~~
fs/io_uring.c: In function 'io_close':
fs/io_uring.c:4266:22: error: 'IO_WQ_WORK_NO_CANCEL' undeclared (first use in this function); did you mean 'IO_WQ_WORK_CANCEL'?
4266 | req->work.flags |= IO_WQ_WORK_NO_CANCEL;
| ^~~~~~~~~~~~~~~~~~~~
| IO_WQ_WORK_CANCEL
fs/io_uring.c:4266:22: note: each undeclared identifier is reported only once for each function it appears in
fs/io_uring.c: In function 'io_wq_submit_work':
fs/io_uring.c:6091:3: error: implicit declaration of function 'io_req_task_work_add_fallback'; did you mean 'io_req_task_work_add'? [-Werror=implicit-function-declaration]
6091 | io_req_task_work_add_fallback(req, io_req_task_cancel);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| io_req_task_work_add
fs/io_uring.c:6092:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
6092 | return;
| ^~~~~~
fs/io_uring.c:6077:27: note: declared here
6077 | static struct io_wq_work *io_wq_submit_work(struct io_wq_work *work)
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/out_free +3462 fs/io_uring.c
f67676d160c6ee Jens Axboe 2019-12-02 3397
a1d7c393c4711a Jens Axboe 2020-06-22 3398 static int io_read(struct io_kiocb *req, bool force_nonblock,
a1d7c393c4711a Jens Axboe 2020-06-22 3399 struct io_comp_state *cs)
2b188cc1bb857a Jens Axboe 2019-01-07 3400 {
2b188cc1bb857a Jens Axboe 2019-01-07 3401 struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
9adbd45d6d32ff Jens Axboe 2019-12-20 3402 struct kiocb *kiocb = &req->rw.kiocb;
ff6165b2d7f66f Jens Axboe 2020-08-13 3403 struct iov_iter __iter, *iter = &__iter;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3404 struct io_async_rw *rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3405 ssize_t io_size, ret, ret2;
f5cac8b156e8b7 Jens Axboe 2020-09-14 3406 bool no_async;
ff6165b2d7f66f Jens Axboe 2020-08-13 3407
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3408 if (rw)
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3409 iter = &rw->iter;
2b188cc1bb857a Jens Axboe 2019-01-07 3410
ff6165b2d7f66f Jens Axboe 2020-08-13 3411 ret = io_import_iovec(READ, req, &iovec, iter, !force_nonblock);
f67676d160c6ee Jens Axboe 2019-12-02 3412 if (ret < 0)
2b188cc1bb857a Jens Axboe 2019-01-07 3413 return ret;
758adcb5e98092 Pavel Begunkov 2020-11-07 3414 io_size = iov_iter_count(iter);
fa15bafb71fd7a Pavel Begunkov 2020-08-01 3415 req->result = io_size;
227c0c9673d867 Jens Axboe 2020-08-13 3416 ret = 0;
2b188cc1bb857a Jens Axboe 2019-01-07 3417
fd6c2e4c063d64 Jens Axboe 2019-12-18 3418 /* Ensure we clear previously set non-block flag */
fd6c2e4c063d64 Jens Axboe 2019-12-18 3419 if (!force_nonblock)
29de5f6a350778 Jens Axboe 2020-02-20 3420 kiocb->ki_flags &= ~IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3421 else
a88fc400212fc1 Pavel Begunkov 2020-09-30 3422 kiocb->ki_flags |= IOCB_NOWAIT;
a88fc400212fc1 Pavel Begunkov 2020-09-30 3423
24c74678634b3c Pavel Begunkov 2020-06-21 3424 /* If the file doesn't support async, just async punt */
f5cac8b156e8b7 Jens Axboe 2020-09-14 3425 no_async = force_nonblock && !io_file_supports_async(req->file, READ);
f5cac8b156e8b7 Jens Axboe 2020-09-14 3426 if (no_async)
f67676d160c6ee Jens Axboe 2019-12-02 3427 goto copy_iov;
9e645e1105ca60 Jens Axboe 2019-05-10 3428
758adcb5e98092 Pavel Begunkov 2020-11-07 3429 ret = rw_verify_area(READ, req->file, io_kiocb_ppos(kiocb), io_size);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3430 if (unlikely(ret)) {
107abcc47e3a96 Pavel Begunkov 2021-02-04 3431 kfree(iovec);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3432 return ret;
107abcc47e3a96 Pavel Begunkov 2021-02-04 3433 }
2b188cc1bb857a Jens Axboe 2019-01-07 3434
227c0c9673d867 Jens Axboe 2020-08-13 3435 ret = io_iter_do_read(req, iter);
32960613b7c335 Jens Axboe 2019-09-23 3436
d964a45ff1644d Pavel Begunkov 2021-02-01 3437 if (ret == -EIOCBQUEUED) {
107abcc47e3a96 Pavel Begunkov 2021-02-04 3438 /* it's faster to check here then delegate to kfree */
107abcc47e3a96 Pavel Begunkov 2021-02-04 3439 if (iovec)
107abcc47e3a96 Pavel Begunkov 2021-02-04 3440 kfree(iovec);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3441 return 0;
227c0c9673d867 Jens Axboe 2020-08-13 3442 } else if (ret == -EAGAIN) {
eefdf30f3dcb5c Jens Axboe 2020-08-27 3443 /* IOPOLL retry should happen for io-wq threads */
eefdf30f3dcb5c Jens Axboe 2020-08-27 3444 if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL))
f91daf565b0e27 Jens Axboe 2020-08-15 3445 goto done;
355afaeb578aba Jens Axboe 2020-09-02 3446 /* no retry on NONBLOCK marked file */
355afaeb578aba Jens Axboe 2020-09-02 3447 if (req->file->f_flags & O_NONBLOCK)
355afaeb578aba Jens Axboe 2020-09-02 3448 goto done;
842163154b87b0 Jens Axboe 2020-08-24 3449 /* some cases will consume bytes even on error returns */
758adcb5e98092 Pavel Begunkov 2020-11-07 3450 iov_iter_revert(iter, io_size - iov_iter_count(iter));
f38c7e3abfba9a Jens Axboe 2020-09-25 3451 ret = 0;
82b6fe19520be5 Pavel Begunkov 2021-02-04 3452 } else if (ret <= 0 || ret == io_size || !force_nonblock ||
82b6fe19520be5 Pavel Begunkov 2021-02-04 3453 (req->file->f_flags & O_NONBLOCK) ||
82b6fe19520be5 Pavel Begunkov 2021-02-04 3454 !(req->flags & REQ_F_ISREG)) {
82b6fe19520be5 Pavel Begunkov 2021-02-04 3455 /* read all, failed, already did sync or don't want to retry */
00d23d516e2e79 Jens Axboe 2020-08-25 3456 goto done;
75a2698c924a90 Pavel Begunkov 2021-02-04 3457 }
75a2698c924a90 Pavel Begunkov 2021-02-04 3458
227c0c9673d867 Jens Axboe 2020-08-13 3459 ret2 = io_setup_async_rw(req, iovec, inline_vecs, iter, true);
227c0c9673d867 Jens Axboe 2020-08-13 3460 if (ret2) {
227c0c9673d867 Jens Axboe 2020-08-13 3461 ret = ret2;
227c0c9673d867 Jens Axboe 2020-08-13 @3462 goto out_free;
f67676d160c6ee Jens Axboe 2019-12-02 3463 }
f5cac8b156e8b7 Jens Axboe 2020-09-14 3464 if (no_async)
f5cac8b156e8b7 Jens Axboe 2020-09-14 3465 return -EAGAIN;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3466 rw = req->async_data;
227c0c9673d867 Jens Axboe 2020-08-13 3467 /* now use our persistent iterator, if we aren't already */
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3468 iter = &rw->iter;
227c0c9673d867 Jens Axboe 2020-08-13 3469 retry:
82b6fe19520be5 Pavel Begunkov 2021-02-04 3470 io_size -= ret;
e8c2bc1fb6c949 Jens Axboe 2020-08-15 3471 rw->bytes_done += ret;
227c0c9673d867 Jens Axboe 2020-08-13 3472 /* if we can retry, do so with the callbacks armed */
227c0c9673d867 Jens Axboe 2020-08-13 3473 if (!io_rw_should_retry(req)) {
bcf5a06304d69a Jens Axboe 2020-05-22 3474 kiocb->ki_flags &= ~IOCB_WAITQ;
f67676d160c6ee Jens Axboe 2019-12-02 3475 return -EAGAIN;
2b188cc1bb857a Jens Axboe 2019-01-07 3476 }
227c0c9673d867 Jens Axboe 2020-08-13 3477
227c0c9673d867 Jens Axboe 2020-08-13 3478 /*
227c0c9673d867 Jens Axboe 2020-08-13 3479 * Now retry read with the IOCB_WAITQ parts set in the iocb. If we
227c0c9673d867 Jens Axboe 2020-08-13 3480 * get -EIOCBQUEUED, then we'll get a notification when the desired
227c0c9673d867 Jens Axboe 2020-08-13 3481 * page gets unlocked. We can also get a partial read here, and if we
227c0c9673d867 Jens Axboe 2020-08-13 3482 * do, then just retry at the new offset.
227c0c9673d867 Jens Axboe 2020-08-13 3483 */
227c0c9673d867 Jens Axboe 2020-08-13 3484 ret = io_iter_do_read(req, iter);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3485 if (ret == -EIOCBQUEUED)
107abcc47e3a96 Pavel Begunkov 2021-02-04 3486 return 0;
227c0c9673d867 Jens Axboe 2020-08-13 3487 /* we got some bytes, but not all. retry. */
107abcc47e3a96 Pavel Begunkov 2021-02-04 3488 if (ret > 0 && ret < io_size)
227c0c9673d867 Jens Axboe 2020-08-13 3489 goto retry;
227c0c9673d867 Jens Axboe 2020-08-13 3490 done:
227c0c9673d867 Jens Axboe 2020-08-13 3491 kiocb_done(kiocb, ret, cs);
107abcc47e3a96 Pavel Begunkov 2021-02-04 3492 return 0;
2b188cc1bb857a Jens Axboe 2019-01-07 3493 }
2b188cc1bb857a Jens Axboe 2019-01-07 3494
:::::: The code at line 3462 was first introduced by commit
:::::: 227c0c9673d86732995474d277f84e08ee763e46 io_uring: internally retry short reads
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[sashal-linux-stable:queue-5.10 62/74] fs/io_uring.c:3427:8: error: use of undeclared label 'copy_iov'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.10
head: 9ced6633127bd25a94939777d9ecda54800859fc
commit: 75a2698c924a9065cc53174004ef4aabfd6eb3c1 [62/74] io_uring: further simplify do_read error parsing
config: powerpc-randconfig-r002-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6db3ab2903f42712f44000afb5aa467efbd25f35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.10
git checkout 75a2698c924a9065cc53174004ef4aabfd6eb3c1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> fs/io_uring.c:3427:8: error: use of undeclared label 'copy_iov'
goto copy_iov;
^
fs/io_uring.c:4275:22: error: use of undeclared identifier 'IO_WQ_WORK_NO_CANCEL'; did you mean 'IO_WQ_WORK_CANCEL'?
req->work.flags |= IO_WQ_WORK_NO_CANCEL;
^~~~~~~~~~~~~~~~~~~~
IO_WQ_WORK_CANCEL
fs/io-wq.h:9:2: note: 'IO_WQ_WORK_CANCEL' declared here
IO_WQ_WORK_CANCEL = 1,
^
fs/io_uring.c:6100:3: error: implicit declaration of function 'io_req_task_work_add_fallback' [-Werror,-Wimplicit-function-declaration]
io_req_task_work_add_fallback(req, io_req_task_cancel);
^
fs/io_uring.c:6100:3: note: did you mean 'io_req_task_work_add'?
fs/io_uring.c:2027:12: note: 'io_req_task_work_add' declared here
static int io_req_task_work_add(struct io_kiocb *req, bool twa_signal_ok)
^
fs/io_uring.c:6101:3: error: non-void function 'io_wq_submit_work' should return a value [-Wreturn-type]
return;
^
4 errors generated.
vim +/copy_iov +3427 fs/io_uring.c
f67676d160c6ee2 Jens Axboe 2019-12-02 3397
a1d7c393c4711a9 Jens Axboe 2020-06-22 3398 static int io_read(struct io_kiocb *req, bool force_nonblock,
a1d7c393c4711a9 Jens Axboe 2020-06-22 3399 struct io_comp_state *cs)
2b188cc1bb857a9 Jens Axboe 2019-01-07 3400 {
2b188cc1bb857a9 Jens Axboe 2019-01-07 3401 struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
9adbd45d6d32ffc Jens Axboe 2019-12-20 3402 struct kiocb *kiocb = &req->rw.kiocb;
ff6165b2d7f66fc Jens Axboe 2020-08-13 3403 struct iov_iter __iter, *iter = &__iter;
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3404 struct io_async_rw *rw = req->async_data;
227c0c9673d8673 Jens Axboe 2020-08-13 3405 ssize_t io_size, ret, ret2;
f5cac8b156e8b7b Jens Axboe 2020-09-14 3406 bool no_async;
ff6165b2d7f66fc Jens Axboe 2020-08-13 3407
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3408 if (rw)
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3409 iter = &rw->iter;
2b188cc1bb857a9 Jens Axboe 2019-01-07 3410
ff6165b2d7f66fc Jens Axboe 2020-08-13 3411 ret = io_import_iovec(READ, req, &iovec, iter, !force_nonblock);
f67676d160c6ee2 Jens Axboe 2019-12-02 3412 if (ret < 0)
2b188cc1bb857a9 Jens Axboe 2019-01-07 3413 return ret;
758adcb5e98092e Pavel Begunkov 2020-11-07 3414 io_size = iov_iter_count(iter);
fa15bafb71fd7a4 Pavel Begunkov 2020-08-01 3415 req->result = io_size;
227c0c9673d8673 Jens Axboe 2020-08-13 3416 ret = 0;
2b188cc1bb857a9 Jens Axboe 2019-01-07 3417
fd6c2e4c063d645 Jens Axboe 2019-12-18 3418 /* Ensure we clear previously set non-block flag */
fd6c2e4c063d645 Jens Axboe 2019-12-18 3419 if (!force_nonblock)
29de5f6a350778a Jens Axboe 2020-02-20 3420 kiocb->ki_flags &= ~IOCB_NOWAIT;
a88fc400212fc1d Pavel Begunkov 2020-09-30 3421 else
a88fc400212fc1d Pavel Begunkov 2020-09-30 3422 kiocb->ki_flags |= IOCB_NOWAIT;
a88fc400212fc1d Pavel Begunkov 2020-09-30 3423
24c74678634b3cb Pavel Begunkov 2020-06-21 3424 /* If the file doesn't support async, just async punt */
f5cac8b156e8b7b Jens Axboe 2020-09-14 3425 no_async = force_nonblock && !io_file_supports_async(req->file, READ);
f5cac8b156e8b7b Jens Axboe 2020-09-14 3426 if (no_async)
f67676d160c6ee2 Jens Axboe 2019-12-02 @3427 goto copy_iov;
9e645e1105ca60f Jens Axboe 2019-05-10 3428
758adcb5e98092e Pavel Begunkov 2020-11-07 3429 ret = rw_verify_area(READ, req->file, io_kiocb_ppos(kiocb), io_size);
fa15bafb71fd7a4 Pavel Begunkov 2020-08-01 3430 if (unlikely(ret))
fa15bafb71fd7a4 Pavel Begunkov 2020-08-01 3431 goto out_free;
2b188cc1bb857a9 Jens Axboe 2019-01-07 3432
227c0c9673d8673 Jens Axboe 2020-08-13 3433 ret = io_iter_do_read(req, iter);
32960613b7c3352 Jens Axboe 2019-09-23 3434
d964a45ff1644d5 Pavel Begunkov 2021-02-01 3435 if (ret == -EIOCBQUEUED) {
227c0c9673d8673 Jens Axboe 2020-08-13 3436 ret = 0;
f67676d160c6ee2 Jens Axboe 2019-12-02 3437 goto out_free;
227c0c9673d8673 Jens Axboe 2020-08-13 3438 } else if (ret == -EAGAIN) {
eefdf30f3dcb5c1 Jens Axboe 2020-08-27 3439 /* IOPOLL retry should happen for io-wq threads */
eefdf30f3dcb5c1 Jens Axboe 2020-08-27 3440 if (!force_nonblock && !(req->ctx->flags & IORING_SETUP_IOPOLL))
f91daf565b0e272 Jens Axboe 2020-08-15 3441 goto done;
355afaeb578abac Jens Axboe 2020-09-02 3442 /* no retry on NONBLOCK marked file */
355afaeb578abac Jens Axboe 2020-09-02 3443 if (req->file->f_flags & O_NONBLOCK)
355afaeb578abac Jens Axboe 2020-09-02 3444 goto done;
842163154b87b01 Jens Axboe 2020-08-24 3445 /* some cases will consume bytes even on error returns */
758adcb5e98092e Pavel Begunkov 2020-11-07 3446 iov_iter_revert(iter, io_size - iov_iter_count(iter));
f38c7e3abfba9a9 Jens Axboe 2020-09-25 3447 ret = 0;
75a2698c924a906 Pavel Begunkov 2021-02-04 3448 } else if (ret <= 0 || ret == io_size) {
00d23d516e2e790 Jens Axboe 2020-08-25 3449 /* make sure -ERESTARTSYS -> -EINTR is done */
00d23d516e2e790 Jens Axboe 2020-08-25 3450 goto done;
75a2698c924a906 Pavel Begunkov 2021-02-04 3451 } else {
75a2698c924a906 Pavel Begunkov 2021-02-04 3452 /* we did blocking attempt. no retry. */
75a2698c924a906 Pavel Begunkov 2021-02-04 3453 if (!force_nonblock || (req->file->f_flags & O_NONBLOCK) ||
75a2698c924a906 Pavel Begunkov 2021-02-04 3454 !(req->flags & REQ_F_ISREG))
227c0c9673d8673 Jens Axboe 2020-08-13 3455 goto done;
227c0c9673d8673 Jens Axboe 2020-08-13 3456
227c0c9673d8673 Jens Axboe 2020-08-13 3457 io_size -= ret;
75a2698c924a906 Pavel Begunkov 2021-02-04 3458 }
75a2698c924a906 Pavel Begunkov 2021-02-04 3459
227c0c9673d8673 Jens Axboe 2020-08-13 3460 ret2 = io_setup_async_rw(req, iovec, inline_vecs, iter, true);
227c0c9673d8673 Jens Axboe 2020-08-13 3461 if (ret2) {
227c0c9673d8673 Jens Axboe 2020-08-13 3462 ret = ret2;
227c0c9673d8673 Jens Axboe 2020-08-13 3463 goto out_free;
f67676d160c6ee2 Jens Axboe 2019-12-02 3464 }
f5cac8b156e8b7b Jens Axboe 2020-09-14 3465 if (no_async)
f5cac8b156e8b7b Jens Axboe 2020-09-14 3466 return -EAGAIN;
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3467 rw = req->async_data;
227c0c9673d8673 Jens Axboe 2020-08-13 3468 /* it's copied and will be cleaned with ->io */
227c0c9673d8673 Jens Axboe 2020-08-13 3469 iovec = NULL;
227c0c9673d8673 Jens Axboe 2020-08-13 3470 /* now use our persistent iterator, if we aren't already */
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3471 iter = &rw->iter;
227c0c9673d8673 Jens Axboe 2020-08-13 3472 retry:
e8c2bc1fb6c9495 Jens Axboe 2020-08-15 3473 rw->bytes_done += ret;
227c0c9673d8673 Jens Axboe 2020-08-13 3474 /* if we can retry, do so with the callbacks armed */
227c0c9673d8673 Jens Axboe 2020-08-13 3475 if (!io_rw_should_retry(req)) {
bcf5a06304d69a3 Jens Axboe 2020-05-22 3476 kiocb->ki_flags &= ~IOCB_WAITQ;
f67676d160c6ee2 Jens Axboe 2019-12-02 3477 return -EAGAIN;
2b188cc1bb857a9 Jens Axboe 2019-01-07 3478 }
227c0c9673d8673 Jens Axboe 2020-08-13 3479
227c0c9673d8673 Jens Axboe 2020-08-13 3480 /*
227c0c9673d8673 Jens Axboe 2020-08-13 3481 * Now retry read with the IOCB_WAITQ parts set in the iocb. If we
227c0c9673d8673 Jens Axboe 2020-08-13 3482 * get -EIOCBQUEUED, then we'll get a notification when the desired
227c0c9673d8673 Jens Axboe 2020-08-13 3483 * page gets unlocked. We can also get a partial read here, and if we
227c0c9673d8673 Jens Axboe 2020-08-13 3484 * do, then just retry at the new offset.
227c0c9673d8673 Jens Axboe 2020-08-13 3485 */
227c0c9673d8673 Jens Axboe 2020-08-13 3486 ret = io_iter_do_read(req, iter);
227c0c9673d8673 Jens Axboe 2020-08-13 3487 if (ret == -EIOCBQUEUED) {
227c0c9673d8673 Jens Axboe 2020-08-13 3488 ret = 0;
227c0c9673d8673 Jens Axboe 2020-08-13 3489 goto out_free;
227c0c9673d8673 Jens Axboe 2020-08-13 3490 } else if (ret > 0 && ret < io_size) {
227c0c9673d8673 Jens Axboe 2020-08-13 3491 /* we got some bytes, but not all. retry. */
227c0c9673d8673 Jens Axboe 2020-08-13 3492 goto retry;
227c0c9673d8673 Jens Axboe 2020-08-13 3493 }
227c0c9673d8673 Jens Axboe 2020-08-13 3494 done:
227c0c9673d8673 Jens Axboe 2020-08-13 3495 kiocb_done(kiocb, ret, cs);
227c0c9673d8673 Jens Axboe 2020-08-13 3496 ret = 0;
f67676d160c6ee2 Jens Axboe 2019-12-02 3497 out_free:
f261c16861b8295 Pavel Begunkov 2020-08-20 3498 /* it's reportedly faster than delegating the null check to kfree() */
252917c30f551e8 Pavel Begunkov 2020-07-13 3499 if (iovec)
2b188cc1bb857a9 Jens Axboe 2019-01-07 3500 kfree(iovec);
2b188cc1bb857a9 Jens Axboe 2019-01-07 3501 return ret;
2b188cc1bb857a9 Jens Axboe 2019-01-07 3502 }
2b188cc1bb857a9 Jens Axboe 2019-01-07 3503
:::::: The code at line 3427 was first introduced by commit
:::::: f67676d160c6ee2ed82917fadfed6d29cab8237c io_uring: ensure async punted read/write requests copy iovec
:::::: TO: Jens Axboe <axboe(a)kernel.dk>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months