diff options
| -rw-r--r-- | kernel/trace/trace.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d9a4aa02c384..c1752dac613e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -2338,6 +2338,7 @@ static const struct file_operations show_traces_fops = { | |||
| 2338 | .open = show_traces_open, | 2338 | .open = show_traces_open, |
| 2339 | .read = seq_read, | 2339 | .read = seq_read, |
| 2340 | .release = seq_release, | 2340 | .release = seq_release, |
| 2341 | .llseek = seq_lseek, | ||
| 2341 | }; | 2342 | }; |
| 2342 | 2343 | ||
| 2343 | /* | 2344 | /* |
| @@ -2431,6 +2432,7 @@ static const struct file_operations tracing_cpumask_fops = { | |||
| 2431 | .open = tracing_open_generic, | 2432 | .open = tracing_open_generic, |
| 2432 | .read = tracing_cpumask_read, | 2433 | .read = tracing_cpumask_read, |
| 2433 | .write = tracing_cpumask_write, | 2434 | .write = tracing_cpumask_write, |
| 2435 | .llseek = generic_file_llseek, | ||
| 2434 | }; | 2436 | }; |
| 2435 | 2437 | ||
| 2436 | static int tracing_trace_options_show(struct seq_file *m, void *v) | 2438 | static int tracing_trace_options_show(struct seq_file *m, void *v) |
| @@ -2597,6 +2599,7 @@ tracing_readme_read(struct file *filp, char __user *ubuf, | |||
| 2597 | static const struct file_operations tracing_readme_fops = { | 2599 | static const struct file_operations tracing_readme_fops = { |
| 2598 | .open = tracing_open_generic, | 2600 | .open = tracing_open_generic, |
| 2599 | .read = tracing_readme_read, | 2601 | .read = tracing_readme_read, |
| 2602 | .llseek = generic_file_llseek, | ||
| 2600 | }; | 2603 | }; |
| 2601 | 2604 | ||
| 2602 | static ssize_t | 2605 | static ssize_t |
| @@ -2647,6 +2650,7 @@ tracing_saved_cmdlines_read(struct file *file, char __user *ubuf, | |||
| 2647 | static const struct file_operations tracing_saved_cmdlines_fops = { | 2650 | static const struct file_operations tracing_saved_cmdlines_fops = { |
| 2648 | .open = tracing_open_generic, | 2651 | .open = tracing_open_generic, |
| 2649 | .read = tracing_saved_cmdlines_read, | 2652 | .read = tracing_saved_cmdlines_read, |
| 2653 | .llseek = generic_file_llseek, | ||
| 2650 | }; | 2654 | }; |
| 2651 | 2655 | ||
| 2652 | static ssize_t | 2656 | static ssize_t |
| @@ -2976,6 +2980,7 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp) | |||
| 2976 | if (iter->trace->pipe_open) | 2980 | if (iter->trace->pipe_open) |
| 2977 | iter->trace->pipe_open(iter); | 2981 | iter->trace->pipe_open(iter); |
| 2978 | 2982 | ||
| 2983 | nonseekable_open(inode, filp); | ||
| 2979 | out: | 2984 | out: |
| 2980 | mutex_unlock(&trace_types_lock); | 2985 | mutex_unlock(&trace_types_lock); |
| 2981 | return ret; | 2986 | return ret; |
| @@ -3534,18 +3539,21 @@ static const struct file_operations tracing_max_lat_fops = { | |||
| 3534 | .open = tracing_open_generic, | 3539 | .open = tracing_open_generic, |
| 3535 | .read = tracing_max_lat_read, | 3540 | .read = tracing_max_lat_read, |
| 3536 | .write = tracing_max_lat_write, | 3541 | .write = tracing_max_lat_write, |
| 3542 | .llseek = generic_file_llseek, | ||
| 3537 | }; | 3543 | }; |
| 3538 | 3544 | ||
| 3539 | static const struct file_operations tracing_ctrl_fops = { | 3545 | static const struct file_operations tracing_ctrl_fops = { |
| 3540 | .open = tracing_open_generic, | 3546 | .open = tracing_open_generic, |
| 3541 | .read = tracing_ctrl_read, | 3547 | .read = tracing_ctrl_read, |
| 3542 | .write = tracing_ctrl_write, | 3548 | .write = tracing_ctrl_write, |
| 3549 | .llseek = generic_file_llseek, | ||
| 3543 | }; | 3550 | }; |
| 3544 | 3551 | ||
| 3545 | static const struct file_operations set_tracer_fops = { | 3552 | static const struct file_operations set_tracer_fops = { |
| 3546 | .open = tracing_open_generic, | 3553 | .open = tracing_open_generic, |
| 3547 | .read = tracing_set_trace_read, | 3554 | .read = tracing_set_trace_read, |
| 3548 | .write = tracing_set_trace_write, | 3555 | .write = tracing_set_trace_write, |
| 3556 | .llseek = generic_file_llseek, | ||
| 3549 | }; | 3557 | }; |
| 3550 | 3558 | ||
| 3551 | static const struct file_operations tracing_pipe_fops = { | 3559 | static const struct file_operations tracing_pipe_fops = { |
| @@ -3554,17 +3562,20 @@ static const struct file_operations tracing_pipe_fops = { | |||
| 3554 | .read = tracing_read_pipe, | 3562 | .read = tracing_read_pipe, |
| 3555 | .splice_read = tracing_splice_read_pipe, | 3563 | .splice_read = tracing_splice_read_pipe, |
| 3556 | .release = tracing_release_pipe, | 3564 | .release = tracing_release_pipe, |
| 3565 | .llseek = no_llseek, | ||
| 3557 | }; | 3566 | }; |
| 3558 | 3567 | ||
| 3559 | static const struct file_operations tracing_entries_fops = { | 3568 | static const struct file_operations tracing_entries_fops = { |
| 3560 | .open = tracing_open_generic, | 3569 | .open = tracing_open_generic, |
| 3561 | .read = tracing_entries_read, | 3570 | .read = tracing_entries_read, |
| 3562 | .write = tracing_entries_write, | 3571 | .write = tracing_entries_write, |
| 3572 | .llseek = generic_file_llseek, | ||
| 3563 | }; | 3573 | }; |
| 3564 | 3574 | ||
| 3565 | static const struct file_operations tracing_mark_fops = { | 3575 | static const struct file_operations tracing_mark_fops = { |
| 3566 | .open = tracing_open_generic, | 3576 | .open = tracing_open_generic, |
| 3567 | .write = tracing_mark_write, | 3577 | .write = tracing_mark_write, |
| 3578 | .llseek = generic_file_llseek, | ||
| 3568 | }; | 3579 | }; |
| 3569 | 3580 | ||
| 3570 | static const struct file_operations trace_clock_fops = { | 3581 | static const struct file_operations trace_clock_fops = { |
| @@ -3870,6 +3881,7 @@ tracing_stats_read(struct file *filp, char __user *ubuf, | |||
| 3870 | static const struct file_operations tracing_stats_fops = { | 3881 | static const struct file_operations tracing_stats_fops = { |
| 3871 | .open = tracing_open_generic, | 3882 | .open = tracing_open_generic, |
| 3872 | .read = tracing_stats_read, | 3883 | .read = tracing_stats_read, |
| 3884 | .llseek = generic_file_llseek, | ||
| 3873 | }; | 3885 | }; |
| 3874 | 3886 | ||
| 3875 | #ifdef CONFIG_DYNAMIC_FTRACE | 3887 | #ifdef CONFIG_DYNAMIC_FTRACE |
| @@ -3906,6 +3918,7 @@ tracing_read_dyn_info(struct file *filp, char __user *ubuf, | |||
| 3906 | static const struct file_operations tracing_dyn_info_fops = { | 3918 | static const struct file_operations tracing_dyn_info_fops = { |
| 3907 | .open = tracing_open_generic, | 3919 | .open = tracing_open_generic, |
| 3908 | .read = tracing_read_dyn_info, | 3920 | .read = tracing_read_dyn_info, |
| 3921 | .llseek = generic_file_llseek, | ||
| 3909 | }; | 3922 | }; |
| 3910 | #endif | 3923 | #endif |
| 3911 | 3924 | ||
| @@ -4059,6 +4072,7 @@ static const struct file_operations trace_options_fops = { | |||
| 4059 | .open = tracing_open_generic, | 4072 | .open = tracing_open_generic, |
| 4060 | .read = trace_options_read, | 4073 | .read = trace_options_read, |
| 4061 | .write = trace_options_write, | 4074 | .write = trace_options_write, |
| 4075 | .llseek = generic_file_llseek, | ||
| 4062 | }; | 4076 | }; |
| 4063 | 4077 | ||
| 4064 | static ssize_t | 4078 | static ssize_t |
| @@ -4110,6 +4124,7 @@ static const struct file_operations trace_options_core_fops = { | |||
| 4110 | .open = tracing_open_generic, | 4124 | .open = tracing_open_generic, |
| 4111 | .read = trace_options_core_read, | 4125 | .read = trace_options_core_read, |
| 4112 | .write = trace_options_core_write, | 4126 | .write = trace_options_core_write, |
| 4127 | .llseek = generic_file_llseek, | ||
| 4113 | }; | 4128 | }; |
| 4114 | 4129 | ||
| 4115 | struct dentry *trace_create_file(const char *name, | 4130 | struct dentry *trace_create_file(const char *name, |
