diff options
| author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2017-01-21 00:09:08 -0500 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2017-01-27 16:05:26 -0500 |
| commit | b18b6a9cef7f30e9a8b7738d5fc8d568cf660855 (patch) | |
| tree | 51be9f1d6b36120182dc4e0906460ddc1e011d65 /fs/proc | |
| parent | 9f8197980d87a28ec3d0b3b986f770e7e7878485 (diff) | |
timers: Omit POSIX timer stuff from task_struct when disabled
When CONFIG_POSIX_TIMERS is disabled, it is preferable to remove related
structures from struct task_struct and struct signal_struct as they
won't contain anything useful and shouldn't be relied upon by mistake.
Code still referencing those structures is also disabled here.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'fs/proc')
| -rw-r--r-- | fs/proc/base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8e7e61b28f31..03deeac1e835 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -2179,7 +2179,7 @@ static const struct file_operations proc_map_files_operations = { | |||
| 2179 | .llseek = generic_file_llseek, | 2179 | .llseek = generic_file_llseek, |
| 2180 | }; | 2180 | }; |
| 2181 | 2181 | ||
| 2182 | #ifdef CONFIG_CHECKPOINT_RESTORE | 2182 | #if defined(CONFIG_CHECKPOINT_RESTORE) && defined(CONFIG_POSIX_TIMERS) |
| 2183 | struct timers_private { | 2183 | struct timers_private { |
| 2184 | struct pid *pid; | 2184 | struct pid *pid; |
| 2185 | struct task_struct *task; | 2185 | struct task_struct *task; |
| @@ -2936,7 +2936,7 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
| 2936 | REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations), | 2936 | REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations), |
| 2937 | REG("setgroups", S_IRUGO|S_IWUSR, proc_setgroups_operations), | 2937 | REG("setgroups", S_IRUGO|S_IWUSR, proc_setgroups_operations), |
| 2938 | #endif | 2938 | #endif |
| 2939 | #ifdef CONFIG_CHECKPOINT_RESTORE | 2939 | #if defined(CONFIG_CHECKPOINT_RESTORE) && defined(CONFIG_POSIX_TIMERS) |
| 2940 | REG("timers", S_IRUGO, proc_timers_operations), | 2940 | REG("timers", S_IRUGO, proc_timers_operations), |
| 2941 | #endif | 2941 | #endif |
| 2942 | REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations), | 2942 | REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations), |
