diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 56154bbb8da9..d0036e52a24a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -626,6 +626,10 @@ struct signal_struct { | |||
626 | 626 | ||
627 | int oom_adj; /* OOM kill score adjustment (bit shift) */ | 627 | int oom_adj; /* OOM kill score adjustment (bit shift) */ |
628 | int oom_score_adj; /* OOM kill score adjustment */ | 628 | int oom_score_adj; /* OOM kill score adjustment */ |
629 | |||
630 | struct mutex cred_guard_mutex; /* guard against foreign influences on | ||
631 | * credential calculations | ||
632 | * (notably. ptrace) */ | ||
629 | }; | 633 | }; |
630 | 634 | ||
631 | /* Context switch must be unlocked if interrupts are to be enabled */ | 635 | /* Context switch must be unlocked if interrupts are to be enabled */ |
@@ -668,6 +672,9 @@ struct user_struct { | |||
668 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ | 672 | atomic_t inotify_watches; /* How many inotify watches does this user have? */ |
669 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ | 673 | atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
670 | #endif | 674 | #endif |
675 | #ifdef CONFIG_FANOTIFY | ||
676 | atomic_t fanotify_listeners; | ||
677 | #endif | ||
671 | #ifdef CONFIG_EPOLL | 678 | #ifdef CONFIG_EPOLL |
672 | atomic_t epoll_watches; /* The number of file descriptors currently watched */ | 679 | atomic_t epoll_watches; /* The number of file descriptors currently watched */ |
673 | #endif | 680 | #endif |
@@ -1076,7 +1083,7 @@ struct sched_class { | |||
1076 | struct task_struct *task); | 1083 | struct task_struct *task); |
1077 | 1084 | ||
1078 | #ifdef CONFIG_FAIR_GROUP_SCHED | 1085 | #ifdef CONFIG_FAIR_GROUP_SCHED |
1079 | void (*moved_group) (struct task_struct *p, int on_rq); | 1086 | void (*task_move_group) (struct task_struct *p, int on_rq); |
1080 | #endif | 1087 | #endif |
1081 | }; | 1088 | }; |
1082 | 1089 | ||
@@ -1305,9 +1312,6 @@ struct task_struct { | |||
1305 | * credentials (COW) */ | 1312 | * credentials (COW) */ |
1306 | const struct cred __rcu *cred; /* effective (overridable) subjective task | 1313 | const struct cred __rcu *cred; /* effective (overridable) subjective task |
1307 | * credentials (COW) */ | 1314 | * credentials (COW) */ |
1308 | struct mutex cred_guard_mutex; /* guard against foreign influences on | ||
1309 | * credential calculations | ||
1310 | * (notably. ptrace) */ | ||
1311 | struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ | 1315 | struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ |
1312 | 1316 | ||
1313 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 1317 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
@@ -1706,7 +1710,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1706 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1710 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
1707 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ | 1711 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ |
1708 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1712 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1709 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ | ||
1710 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1713 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1711 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ | 1714 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ |
1712 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1715 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
@@ -2237,9 +2240,16 @@ static inline void task_unlock(struct task_struct *p) | |||
2237 | spin_unlock(&p->alloc_lock); | 2240 | spin_unlock(&p->alloc_lock); |
2238 | } | 2241 | } |
2239 | 2242 | ||
2240 | extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, | 2243 | extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, |
2241 | unsigned long *flags); | 2244 | unsigned long *flags); |
2242 | 2245 | ||
2246 | #define lock_task_sighand(tsk, flags) \ | ||
2247 | ({ struct sighand_struct *__ss; \ | ||
2248 | __cond_lock(&(tsk)->sighand->siglock, \ | ||
2249 | (__ss = __lock_task_sighand(tsk, flags))); \ | ||
2250 | __ss; \ | ||
2251 | }) \ | ||
2252 | |||
2243 | static inline void unlock_task_sighand(struct task_struct *tsk, | 2253 | static inline void unlock_task_sighand(struct task_struct *tsk, |
2244 | unsigned long *flags) | 2254 | unsigned long *flags) |
2245 | { | 2255 | { |