aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0383601a927c..be7adb7588e5 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -336,6 +336,9 @@ extern unsigned long sysctl_hung_task_warnings;
336extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, 336extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
337 void __user *buffer, 337 void __user *buffer,
338 size_t *lenp, loff_t *ppos); 338 size_t *lenp, loff_t *ppos);
339#else
340/* Avoid need for ifdefs elsewhere in the code */
341enum { sysctl_hung_task_timeout_secs = 0 };
339#endif 342#endif
340 343
341/* Attach to any functions which should be ignored in wchan output. */ 344/* Attach to any functions which should be ignored in wchan output. */
@@ -623,6 +626,10 @@ struct signal_struct {
623 626
624 int oom_adj; /* OOM kill score adjustment (bit shift) */ 627 int oom_adj; /* OOM kill score adjustment (bit shift) */
625 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) */
626}; 633};
627 634
628/* Context switch must be unlocked if interrupts are to be enabled */ 635/* Context switch must be unlocked if interrupts are to be enabled */
@@ -1302,9 +1309,6 @@ struct task_struct {
1302 * credentials (COW) */ 1309 * credentials (COW) */
1303 const struct cred __rcu *cred; /* effective (overridable) subjective task 1310 const struct cred __rcu *cred; /* effective (overridable) subjective task
1304 * credentials (COW) */ 1311 * credentials (COW) */
1305 struct mutex cred_guard_mutex; /* guard against foreign influences on
1306 * credential calculations
1307 * (notably. ptrace) */
1308 struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ 1312 struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */
1309 1313
1310 char comm[TASK_COMM_LEN]; /* executable name excluding path 1314 char comm[TASK_COMM_LEN]; /* executable name excluding path
@@ -1703,7 +1707,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *
1703#define PF_DUMPCORE 0x00000200 /* dumped core */ 1707#define PF_DUMPCORE 0x00000200 /* dumped core */
1704#define PF_SIGNALED 0x00000400 /* killed by a signal */ 1708#define PF_SIGNALED 0x00000400 /* killed by a signal */
1705#define PF_MEMALLOC 0x00000800 /* Allocating memory */ 1709#define PF_MEMALLOC 0x00000800 /* Allocating memory */
1706#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
1707#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ 1710#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
1708#define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ 1711#define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */
1709#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ 1712#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
@@ -2234,9 +2237,16 @@ static inline void task_unlock(struct task_struct *p)
2234 spin_unlock(&p->alloc_lock); 2237 spin_unlock(&p->alloc_lock);
2235} 2238}
2236 2239
2237extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, 2240extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
2238 unsigned long *flags); 2241 unsigned long *flags);
2239 2242
2243#define lock_task_sighand(tsk, flags) \
2244({ struct sighand_struct *__ss; \
2245 __cond_lock(&(tsk)->sighand->siglock, \
2246 (__ss = __lock_task_sighand(tsk, flags))); \
2247 __ss; \
2248}) \
2249
2240static inline void unlock_task_sighand(struct task_struct *tsk, 2250static inline void unlock_task_sighand(struct task_struct *tsk,
2241 unsigned long *flags) 2251 unsigned long *flags)
2242{ 2252{