All of lore.kernel.org
 help / color / mirror / Atom feed
* [brauner:clone_into_cgroup 2/2] kernel/fork.c:2299:2: error: too many arguments to function 'cgroup_cancel_fork'
@ 2019-12-08 17:43 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-08 17:43 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git clone_into_cgroup
head:   5975ba59d3593da3c54c35a88c71ad6488160774
commit: 5975ba59d3593da3c54c35a88c71ad6488160774 [2/2] save
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        git checkout 5975ba59d3593da3c54c35a88c71ad6488160774
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/fork.c: In function 'copy_process':
   kernel/fork.c:2170:11: error: implicit declaration of function 'cgroup_fork_css_set_find'; did you mean 'cgroup_post_fork'? [-Werror=implicit-function-declaration]
     retval = cgroup_fork_css_set_find(current, args);
              ^~~~~~~~~~~~~~~~~~~~~~~~
              cgroup_post_fork
   kernel/fork.c:2180:11: error: too many arguments to function 'cgroup_can_fork'
     retval = cgroup_can_fork(p, args);
              ^~~~~~~~~~~~~~~
   In file included from kernel/fork.c:49:0:
   include/linux/cgroup.h:716:19: note: declared here
    static inline int cgroup_can_fork(struct task_struct *p) { return 0; }
                      ^~~~~~~~~~~~~~~
   kernel/fork.c:2287:2: error: too many arguments to function 'cgroup_post_fork'
     cgroup_post_fork(p, args);
     ^~~~~~~~~~~~~~~~
   In file included from kernel/fork.c:49:0:
   include/linux/cgroup.h:718:20: note: declared here
    static inline void cgroup_post_fork(struct task_struct *p) {}
                       ^~~~~~~~~~~~~~~~
>> kernel/fork.c:2299:2: error: too many arguments to function 'cgroup_cancel_fork'
     cgroup_cancel_fork(p, args);
     ^~~~~~~~~~~~~~~~~~
   In file included from kernel/fork.c:49:0:
   include/linux/cgroup.h:717:20: note: declared here
    static inline void cgroup_cancel_fork(struct task_struct *p) {}
                       ^~~~~~~~~~~~~~~~~~
>> kernel/fork.c:2300:2: error: implicit declaration of function 'cgroup_fork_css_set_put' [-Werror=implicit-function-declaration]
     cgroup_fork_css_set_put(args);
     ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/cgroup_cancel_fork +2299 kernel/fork.c

  2040	
  2041		/* Perform scheduler related setup. Assign this task to a CPU. */
  2042		retval = sched_fork(clone_flags, p);
  2043		if (retval)
  2044			goto bad_fork_cleanup_policy;
  2045	
  2046		retval = perf_event_init_task(p);
  2047		if (retval)
  2048			goto bad_fork_cleanup_policy;
  2049		retval = audit_alloc(p);
  2050		if (retval)
  2051			goto bad_fork_cleanup_perf;
  2052		/* copy all the process information */
  2053		shm_init_task(p);
  2054		retval = security_task_alloc(p, clone_flags);
  2055		if (retval)
  2056			goto bad_fork_cleanup_audit;
  2057		retval = copy_semundo(clone_flags, p);
  2058		if (retval)
  2059			goto bad_fork_cleanup_security;
  2060		retval = copy_files(clone_flags, p);
  2061		if (retval)
  2062			goto bad_fork_cleanup_semundo;
  2063		retval = copy_fs(clone_flags, p);
  2064		if (retval)
  2065			goto bad_fork_cleanup_files;
  2066		retval = copy_sighand(clone_flags, p);
  2067		if (retval)
  2068			goto bad_fork_cleanup_fs;
  2069		retval = copy_signal(clone_flags, p);
  2070		if (retval)
  2071			goto bad_fork_cleanup_sighand;
  2072		retval = copy_mm(clone_flags, p);
  2073		if (retval)
  2074			goto bad_fork_cleanup_signal;
  2075		retval = copy_namespaces(clone_flags, p);
  2076		if (retval)
  2077			goto bad_fork_cleanup_mm;
  2078		retval = copy_io(clone_flags, p);
  2079		if (retval)
  2080			goto bad_fork_cleanup_namespaces;
  2081		retval = copy_thread_tls(clone_flags, args->stack, args->stack_size, p,
  2082					 args->tls);
  2083		if (retval)
  2084			goto bad_fork_cleanup_io;
  2085	
  2086		stackleak_task_init(p);
  2087	
  2088		if (pid != &init_struct_pid) {
  2089			pid = alloc_pid(p->nsproxy->pid_ns_for_children, args->set_tid,
  2090					args->set_tid_size);
  2091			if (IS_ERR(pid)) {
  2092				retval = PTR_ERR(pid);
  2093				goto bad_fork_cleanup_thread;
  2094			}
  2095		}
  2096	
  2097		/*
  2098		 * This has to happen after we've potentially unshared the file
  2099		 * descriptor table (so that the pidfd doesn't leak into the child
  2100		 * if the fd table isn't shared).
  2101		 */
  2102		if (clone_flags & CLONE_PIDFD) {
  2103			retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
  2104			if (retval < 0)
  2105				goto bad_fork_free_pid;
  2106	
  2107			pidfd = retval;
  2108	
  2109			pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
  2110						      O_RDWR | O_CLOEXEC);
  2111			if (IS_ERR(pidfile)) {
  2112				put_unused_fd(pidfd);
  2113				retval = PTR_ERR(pidfile);
  2114				goto bad_fork_free_pid;
  2115			}
  2116			get_pid(pid);	/* held by pidfile now */
  2117	
  2118			retval = put_user(pidfd, args->pidfd);
  2119			if (retval)
  2120				goto bad_fork_put_pidfd;
  2121		}
  2122	
  2123	#ifdef CONFIG_BLOCK
  2124		p->plug = NULL;
  2125	#endif
  2126		futex_init_task(p);
  2127	
  2128		/*
  2129		 * sigaltstack should be cleared when sharing the same VM
  2130		 */
  2131		if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM)
  2132			sas_ss_reset(p);
  2133	
  2134		/*
  2135		 * Syscall tracing and stepping should be turned off in the
  2136		 * child regardless of CLONE_PTRACE.
  2137		 */
  2138		user_disable_single_step(p);
  2139		clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);
  2140	#ifdef TIF_SYSCALL_EMU
  2141		clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
  2142	#endif
  2143		clear_tsk_latency_tracing(p);
  2144	
  2145		/* ok, now we should be set up.. */
  2146		p->pid = pid_nr(pid);
  2147		if (clone_flags & CLONE_THREAD) {
  2148			p->exit_signal = -1;
  2149			p->group_leader = current->group_leader;
  2150			p->tgid = current->tgid;
  2151		} else {
  2152			if (clone_flags & CLONE_PARENT)
  2153				p->exit_signal = current->group_leader->exit_signal;
  2154			else
  2155				p->exit_signal = args->exit_signal;
  2156			p->group_leader = p;
  2157			p->tgid = p->pid;
  2158		}
  2159	
  2160		p->nr_dirtied = 0;
  2161		p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
  2162		p->dirty_paused_when = 0;
  2163	
  2164		p->pdeath_signal = 0;
  2165		INIT_LIST_HEAD(&p->thread_group);
  2166		p->task_works = NULL;
  2167	
  2168		cgroup_threadgroup_change_begin(current);
  2169	
  2170		retval = cgroup_fork_css_set_find(current, args);
  2171		if (retval)
  2172			goto bad_fork_cgroup_threadgroup_change_end;
  2173	
  2174		/*
  2175		 * Ensure that the cgroup subsystem policies allow the new process to be
  2176		 * forked. It should be noted the the new process's css_set can be changed
  2177		 * between here and cgroup_post_fork() if an organisation operation is in
  2178		 * progress.
  2179		 */
  2180		retval = cgroup_can_fork(p, args);
  2181		if (retval)
  2182			goto bad_fork_cgroup_threadgroup_change_end;
  2183	
  2184		/*
  2185		 * From this point on we must avoid any synchronous user-space
  2186		 * communication until we take the tasklist-lock. In particular, we do
  2187		 * not want user-space to be able to predict the process start-time by
  2188		 * stalling fork(2) after we recorded the start_time but before it is
  2189		 * visible to the system.
  2190		 */
  2191	
  2192		p->start_time = ktime_get_ns();
  2193		p->real_start_time = ktime_get_boottime_ns();
  2194	
  2195		/*
  2196		 * Make it visible to the rest of the system, but dont wake it up yet.
  2197		 * Need tasklist lock for parent etc handling!
  2198		 */
  2199		write_lock_irq(&tasklist_lock);
  2200	
  2201		/* CLONE_PARENT re-uses the old parent */
  2202		if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
  2203			p->real_parent = current->real_parent;
  2204			p->parent_exec_id = current->parent_exec_id;
  2205		} else {
  2206			p->real_parent = current;
  2207			p->parent_exec_id = current->self_exec_id;
  2208		}
  2209	
  2210		klp_copy_process(p);
  2211	
  2212		spin_lock(&current->sighand->siglock);
  2213	
  2214		/*
  2215		 * Copy seccomp details explicitly here, in case they were changed
  2216		 * before holding sighand lock.
  2217		 */
  2218		copy_seccomp(p);
  2219	
  2220		rseq_fork(p, clone_flags);
  2221	
  2222		/* Don't start children in a dying pid namespace */
  2223		if (unlikely(!(ns_of_pid(pid)->pid_allocated & PIDNS_ADDING))) {
  2224			retval = -ENOMEM;
  2225			goto bad_fork_cancel_cgroup;
  2226		}
  2227	
  2228		/* Let kill terminate clone/fork in the middle */
  2229		if (fatal_signal_pending(current)) {
  2230			retval = -EINTR;
  2231			goto bad_fork_cancel_cgroup;
  2232		}
  2233	
  2234		/* past the last point of failure */
  2235		if (pidfile)
  2236			fd_install(pidfd, pidfile);
  2237	
  2238		init_task_pid_links(p);
  2239		if (likely(p->pid)) {
  2240			ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
  2241	
  2242			init_task_pid(p, PIDTYPE_PID, pid);
  2243			if (thread_group_leader(p)) {
  2244				init_task_pid(p, PIDTYPE_TGID, pid);
  2245				init_task_pid(p, PIDTYPE_PGID, task_pgrp(current));
  2246				init_task_pid(p, PIDTYPE_SID, task_session(current));
  2247	
  2248				if (is_child_reaper(pid)) {
  2249					ns_of_pid(pid)->child_reaper = p;
  2250					p->signal->flags |= SIGNAL_UNKILLABLE;
  2251				}
  2252				p->signal->shared_pending.signal = delayed.signal;
  2253				p->signal->tty = tty_kref_get(current->signal->tty);
  2254				/*
  2255				 * Inherit has_child_subreaper flag under the same
  2256				 * tasklist_lock with adding child to the process tree
  2257				 * for propagate_has_child_subreaper optimization.
  2258				 */
  2259				p->signal->has_child_subreaper = p->real_parent->signal->has_child_subreaper ||
  2260								 p->real_parent->signal->is_child_subreaper;
  2261				list_add_tail(&p->sibling, &p->real_parent->children);
  2262				list_add_tail_rcu(&p->tasks, &init_task.tasks);
  2263				attach_pid(p, PIDTYPE_TGID);
  2264				attach_pid(p, PIDTYPE_PGID);
  2265				attach_pid(p, PIDTYPE_SID);
  2266				__this_cpu_inc(process_counts);
  2267			} else {
  2268				current->signal->nr_threads++;
  2269				atomic_inc(&current->signal->live);
  2270				refcount_inc(&current->signal->sigcnt);
  2271				task_join_group_stop(p);
  2272				list_add_tail_rcu(&p->thread_group,
  2273						  &p->group_leader->thread_group);
  2274				list_add_tail_rcu(&p->thread_node,
  2275						  &p->signal->thread_head);
  2276			}
  2277			attach_pid(p, PIDTYPE_PID);
  2278			nr_threads++;
  2279		}
  2280		total_forks++;
  2281		hlist_del_init(&delayed.node);
  2282		spin_unlock(&current->sighand->siglock);
  2283		syscall_tracepoint_update(p);
  2284		write_unlock_irq(&tasklist_lock);
  2285	
  2286		proc_fork_connector(p);
> 2287		cgroup_post_fork(p, args);
  2288		cgroup_threadgroup_change_end(current);
  2289		perf_event_fork(p);
  2290	
  2291		trace_task_newtask(p, clone_flags);
  2292		uprobe_copy_process(p, clone_flags);
  2293	
  2294		return p;
  2295	
  2296	bad_fork_cancel_cgroup:
  2297		spin_unlock(&current->sighand->siglock);
  2298		write_unlock_irq(&tasklist_lock);
> 2299		cgroup_cancel_fork(p, args);
> 2300		cgroup_fork_css_set_put(args);
  2301	bad_fork_cgroup_threadgroup_change_end:
  2302		cgroup_threadgroup_change_end(current);
  2303	bad_fork_put_pidfd:
  2304		if (clone_flags & CLONE_PIDFD) {
  2305			fput(pidfile);
  2306			put_unused_fd(pidfd);
  2307		}
  2308	bad_fork_free_pid:
  2309		if (pid != &init_struct_pid)
  2310			free_pid(pid);
  2311	bad_fork_cleanup_thread:
  2312		exit_thread(p);
  2313	bad_fork_cleanup_io:
  2314		if (p->io_context)
  2315			exit_io_context(p);
  2316	bad_fork_cleanup_namespaces:
  2317		exit_task_namespaces(p);
  2318	bad_fork_cleanup_mm:
  2319		if (p->mm) {
  2320			mm_clear_owner(p->mm, p);
  2321			mmput(p->mm);
  2322		}
  2323	bad_fork_cleanup_signal:
  2324		if (!(clone_flags & CLONE_THREAD))
  2325			free_signal_struct(p->signal);
  2326	bad_fork_cleanup_sighand:
  2327		__cleanup_sighand(p->sighand);
  2328	bad_fork_cleanup_fs:
  2329		exit_fs(p); /* blocking */
  2330	bad_fork_cleanup_files:
  2331		exit_files(p); /* blocking */
  2332	bad_fork_cleanup_semundo:
  2333		exit_sem(p);
  2334	bad_fork_cleanup_security:
  2335		security_task_free(p);
  2336	bad_fork_cleanup_audit:
  2337		audit_free(p);
  2338	bad_fork_cleanup_perf:
  2339		perf_event_free_task(p);
  2340	bad_fork_cleanup_policy:
  2341		lockdep_free_task(p);
  2342	#ifdef CONFIG_NUMA
  2343		mpol_put(p->mempolicy);
  2344	bad_fork_cleanup_threadgroup_lock:
  2345	#endif
  2346		delayacct_tsk_free(p);
  2347	bad_fork_cleanup_count:
  2348		atomic_dec(&p->cred->user->processes);
  2349		exit_creds(p);
  2350	bad_fork_free:
  2351		p->state = TASK_DEAD;
  2352		put_task_stack(p);
  2353		delayed_free_task(p);
  2354	fork_out:
  2355		spin_lock_irq(&current->sighand->siglock);
  2356		hlist_del_init(&delayed.node);
  2357		spin_unlock_irq(&current->sighand->siglock);
  2358		return ERR_PTR(retval);
  2359	}
  2360	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-08 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 17:43 [brauner:clone_into_cgroup 2/2] kernel/fork.c:2299:2: error: too many arguments to function 'cgroup_cancel_fork' kbuild 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.