linux-stable/include/linux/sched
Mike Christie 11f3f500ec
fork: add kernel_clone_args flag to not dup/clone files
Each vhost device gets a thread that is used to perform IO and management
operations. Instead of a thread that is accessing a device, the thread is
part of the device, so when it creates a thread using a helper based on
copy_process we can't dup or clone the parent's files/FDS because it
would do an extra increment on ourself.

Later, when we do:

Qemu process exits:
        do_exit -> exit_files -> put_files_struct -> close_files

we would leak the device's resources because of that extra refcount
on the fd or file_struct.

This patch adds a no_files option so these worker threads can prevent
taking an extra refcount on themselves.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Acked-by: Christian Brauner <brauner@kernel.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2023-03-12 10:54:43 +01:00
..
affinity.h
autogroup.h
clock.h sched/clock: Make local_clock() noinstr 2023-01-31 15:01:47 +01:00
cond_resched.h
coredump.h mm: implement memory-deny-write-execute as a prctl 2023-02-02 22:33:24 -08:00
cpufreq.h
cputime.h
deadline.h
debug.h
hotplug.h
idle.h cpuidle, sched: Remove instrumentation from TIF_{POLLING_NRFLAG,NEED_RESCHED} 2023-01-13 11:48:16 +01:00
init.h
isolation.h
jobctl.h
loadavg.h
mm.h
nohz.h
numa_balancing.h
posix-timers.h
prio.h
rseq_api.h
rt.h
sd_flags.h
signal.h
smt.h
stat.h
sysctl.h
task.h fork: add kernel_clone_args flag to not dup/clone files 2023-03-12 10:54:43 +01:00
task_flags.h
task_stack.h
thread_info_api.h
topology.h
types.h
user.h
wake_q.h
xacct.h