diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/init_task.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/linux/sched/task_stack.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index a7083a45a26c..6049baa5b8bc 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/securebits.h> | 13 | #include <linux/securebits.h> |
| 14 | #include <linux/seqlock.h> | 14 | #include <linux/seqlock.h> |
| 15 | #include <linux/rbtree.h> | 15 | #include <linux/rbtree.h> |
| 16 | #include <linux/refcount.h> | ||
| 16 | #include <linux/sched/autogroup.h> | 17 | #include <linux/sched/autogroup.h> |
| 17 | #include <net/net_namespace.h> | 18 | #include <net/net_namespace.h> |
| 18 | #include <linux/sched/rt.h> | 19 | #include <linux/sched/rt.h> |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9d14d6864ca6..628bf13cb5a5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1194,7 +1194,7 @@ struct task_struct { | |||
| 1194 | #endif | 1194 | #endif |
| 1195 | #ifdef CONFIG_THREAD_INFO_IN_TASK | 1195 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
| 1196 | /* A live task holds one reference: */ | 1196 | /* A live task holds one reference: */ |
| 1197 | atomic_t stack_refcount; | 1197 | refcount_t stack_refcount; |
| 1198 | #endif | 1198 | #endif |
| 1199 | #ifdef CONFIG_LIVEPATCH | 1199 | #ifdef CONFIG_LIVEPATCH |
| 1200 | int patch_state; | 1200 | int patch_state; |
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h index 6a841929073f..2413427e439c 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h | |||
| @@ -61,7 +61,7 @@ static inline unsigned long *end_of_stack(struct task_struct *p) | |||
| 61 | #ifdef CONFIG_THREAD_INFO_IN_TASK | 61 | #ifdef CONFIG_THREAD_INFO_IN_TASK |
| 62 | static inline void *try_get_task_stack(struct task_struct *tsk) | 62 | static inline void *try_get_task_stack(struct task_struct *tsk) |
| 63 | { | 63 | { |
| 64 | return atomic_inc_not_zero(&tsk->stack_refcount) ? | 64 | return refcount_inc_not_zero(&tsk->stack_refcount) ? |
| 65 | task_stack_page(tsk) : NULL; | 65 | task_stack_page(tsk) : NULL; |
| 66 | } | 66 | } |
| 67 | 67 | ||
