All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH v0.1 7/9] sched/umcg: add UMCG server/worker API (early RFC)
Date: Sun, 23 May 2021 02:29:18 +0800	[thread overview]
Message-ID: <202105230250.Y0nAkRJn-lkp@intel.com> (raw)
In-Reply-To: <20210520183614.1227046-8-posk@google.com>

[-- Attachment #1: Type: text/plain, Size: 5490 bytes --]

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-preview-RFC-patchset/20210522-232442
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/634e0c0b3bf5d6ede3674f9c754202b1a521ab89
        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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24507 bytes --]

  parent reply	other threads:[~2021-05-22 18:29 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 18:36 [RFC PATCH v0.1 0/9] UMCG early preview/RFC patchset Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 1/9] sched/umcg: add UMCG syscall stubs and CONFIG_UMCG Peter Oskolkov
2021-05-22 18:40   ` kernel test robot
2021-05-22 21:49   ` kernel test robot
2021-05-20 18:36 ` [RFC PATCH v0.1 2/9] sched/umcg: add uapi/linux/umcg.h and sched/umcg.c Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 3/9] sched: add WF_CURRENT_CPU and externise ttwu Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 4/9] sched/umcg: implement core UMCG API Peter Oskolkov
2021-05-21 19:06   ` Andrei Vagin
2021-05-21 21:31     ` Jann Horn
2021-05-21 22:03       ` Peter Oskolkov
2021-05-21 19:32   ` Andy Lutomirski
2021-05-21 22:01     ` Peter Oskolkov
2021-05-21 21:33   ` Jann Horn
2021-06-09 13:01     ` Peter Zijlstra
2021-05-20 18:36 ` [RFC PATCH v0.1 5/9] lib/umcg: implement UMCG core API for userspace Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 6/9] selftests/umcg: add UMCG core API selftest Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 7/9] sched/umcg: add UMCG server/worker API (early RFC) Peter Oskolkov
2021-05-21 20:17   ` Andrei Vagin
2021-05-22 18:29   ` kernel test robot [this message]
2021-05-22 19:34   ` kernel test robot
2021-05-22 20:19   ` kernel test robot
2021-05-20 18:36 ` [RFC PATCH v0.1 8/9] lib/umcg: " Peter Oskolkov
2021-05-20 18:36 ` [RFC PATCH v0.1 9/9] selftests/umcg: add UMCG server/worker API selftest Peter Oskolkov
2021-05-20 21:17 ` [RFC PATCH v0.1 0/9] UMCG early preview/RFC patchset Jonathan Corbet
2021-05-20 21:38   ` Peter Oskolkov
2021-05-21  0:15     ` Randy Dunlap
2021-05-21  8:04       ` Peter Zijlstra
2021-05-21 15:08     ` Jonathan Corbet
2021-05-21 16:03       ` Peter Oskolkov
2021-05-21 19:17         ` Jonathan Corbet
2021-05-27  0:06           ` Peter Oskolkov
2021-05-27 15:41             ` Jonathan Corbet
     [not found] ` <CAEWA0a72SvpcuN4ov=98T3uWtExPCr7BQePOgjkqD1ofWKEASw@mail.gmail.com>
2021-05-21 19:13   ` Peter Oskolkov
2021-05-21 23:08     ` Jann Horn
2021-06-09 12:54 ` Peter Zijlstra
2021-06-09 20:18   ` Peter Oskolkov
2021-06-10 18:02     ` Peter Zijlstra
2021-06-10 20:06       ` Peter Oskolkov
2021-07-07 17:45       ` Thierry Delisle
2021-07-08 21:44         ` Peter Oskolkov

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=202105230250.Y0nAkRJn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.