Hi Peter,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on tip/sched/core]
[also build test WARNING on tip/master]
[cannot apply to kselftest/next linus/master v5.13-rc2 next-20210521]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Peter-Oskolkov/UMCG-early-previe...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
1699949d3314e5d1956fb082e4cd4798bf6149fc
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/634e0c0b3bf5d6ede3674f9c754202b1a...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Peter-Oskolkov/UMCG-early-preview-RFC-patchset/20210522-232442
git checkout 634e0c0b3bf5d6ede3674f9c754202b1a521ab89
# save the attached .config to linux build tree
make W=1 ARCH=um
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/sched/umcg.c:8:
include/linux/syscalls.h:1062:57: error: unknown type name 'flags'
1062 | asmlinkage long umcg_create_group(u32 api_version, u64, flags);
| ^~~~~
kernel/sched/umcg.c: In function '__do_sys_umcg_run_worker':
> kernel/sched/umcg.c:889:27: warning: variable 'worker_ut'
set but not used [-Wunused-but-set-variable]
889 | struct umcg_task __user
*worker_ut;
| ^~~~~~~~~
> kernel/sched/umcg.c:888:27: warning: variable 'server_ut'
set but not used [-Wunused-but-set-variable]
888 | struct umcg_task __user
*server_ut;
| ^~~~~~~~~
vim +/worker_ut +889 kernel/sched/umcg.c
858
859 /**
860 * sys_umcg_run_worker - "run" a RUNNABLE worker as a server
861 * @flags: reserved;
862 * @worker_tid: tid of the worker to run;
863 * @ut: the control struct umcg_task of the worker that blocked
864 * during this "run".
865 *
866 * The worker must be in RUNNABLE state. The server (=current task)
867 * wakes the worker and blocks; when the worker, or one of the workers
868 * in umcg_swap chain, blocks, the server is woken and the syscall returns
869 * with ut indicating the blocked worker.
870 *
871 * If the worker exits or unregisters itself, the syscall succeeds with
872 * ut == NULL.
873 *
874 * Return:
875 * 0 - Ok;
876 * -EINTR - a signal was received;
877 * -EINVAL - one of the parameters is wrong, or a precondition was not met.
878 */
879 SYSCALL_DEFINE3(umcg_run_worker, u32, flags, u32, worker_tid,
880 struct umcg_task __user **, ut)
881 {
882 int ret = -EINVAL;
883 struct task_struct *worker;
884 struct task_struct *server = current;
885 struct umcg_task __user *result = NULL;
886 struct umcg_task_data *worker_utd;
887 struct umcg_task_data *server_utd;
888 struct umcg_task __user *server_ut;
889 struct umcg_task __user *worker_ut;
890
891 if (!ut)
892 return -EINVAL;
893
894 rcu_read_lock();
895 server_utd = rcu_dereference(server->umcg_task_data);
896
897 if (!server_utd || server_utd->task_type != UMCG_TT_SERVER)
898 goto out_rcu;
899
900 if (flags)
901 goto out_rcu;
902
903 worker = find_get_task_by_vpid(worker_tid);
904 if (!worker) {
905 ret = -ESRCH;
906 goto out_rcu;
907 }
908
909 worker_utd = rcu_dereference(worker->umcg_task_data);
910 if (!worker_utd)
911 goto out_rcu;
912
913 if (!READ_ONCE(worker_utd->in_wait)) {
914 ret = -EAGAIN;
915 goto out_rcu;
916 }
917
918 if (server_utd->group != worker_utd->group)
919 goto out_rcu;
920
921 if (rcu_access_pointer(server_utd->peer) != worker)
922 umcg_detach_peer();
923
924 if (!rcu_access_pointer(server_utd->peer)) {
925 umcg_lock_pair(server, worker);
926 WARN_ON(worker_utd->peer);
927 rcu_assign_pointer(server_utd->peer, worker);
928 rcu_assign_pointer(worker_utd->peer, server);
929 umcg_unlock_pair(server, worker);
930 }
931
932 server_ut = server_utd->umcg_task;
933 worker_ut = server_utd->umcg_task;
934
935 rcu_read_unlock();
936
937 ret = do_context_switch(worker);
938 if (ret)
939 return ret;
940
941 rcu_read_lock();
942 worker = rcu_dereference(server_utd->peer);
943 if (worker) {
944 worker_utd = rcu_dereference(worker->umcg_task_data);
945 if (worker_utd)
946 result = worker_utd->umcg_task;
947 }
948 rcu_read_unlock();
949
950 if (put_user(result, ut))
951 return -EFAULT;
952 return 0;
953
954 out_rcu:
955 rcu_read_unlock();
956 return ret;
957 }
958
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org