blob: a16e69764de55a64b51b428551741978ac38b396 [file]
From 1afb0a25eb423a73db2e1b4d3e3d9e71fce6f0e9 Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@kernel.org>
Date: Fri, 10 Mar 2023 16:03:25 -0600
Subject: kernel: Make io_thread and kthread bit fields
From: Mike Christie <michael.christie@oracle.com>
[ Upstream commit c81cc5819faf5dd77124f5086aa654482281ac37 ]
We only set args->io_thread/kthread to 0 or 1 then test if they are set,
so make them bit fields.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Stable-dep-of: cabc249e6560 ("ptrace: refuse to change the signal mask of a user worker")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/sched/task.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index 00135a8d57737..67ea05da511dc 100644
--- a/include/linux/sched/task.h
+++ b/include/linux/sched/task.h
@@ -24,6 +24,8 @@ struct kernel_clone_args {
int __user *child_tid;
int __user *parent_tid;
int exit_signal;
+ u32 kthread:1;
+ u32 io_thread:1;
unsigned long stack;
unsigned long stack_size;
unsigned long tls;
@@ -31,8 +33,6 @@ struct kernel_clone_args {
/* Number of elements in *set_tid */
size_t set_tid_size;
int cgroup;
- int io_thread;
- int kthread;
int idle;
int (*fn)(void *);
void *fn_arg;
--
2.53.0