Repository navigation
Commit df89bf7
tracing: Change event_enable/disable_read() to verify i_private != NULL
commit bc6f6b0 upstream.
tracing_open_generic_file() is racy, ftrace_event_file can be
already freed by rmdir or trace_remove_event_call().
Change event_enable_read() and event_disable_read() to read and
verify "file = i_private" under event_mutex.
This fixes nothing, but now we can change debugfs_remove("enable")
callers to nullify ->i_private and fix the the problem.
Link: http://lkml.kernel.org/r/20130726172536.GA3612@redhat.com
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent fdb65fe commit df89bf7
1 file changed
Lines changed: 19 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
| 685 | + | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
688 | | - | |
689 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
690 | 700 | | |
691 | | - | |
| 701 | + | |
692 | 702 | | |
693 | 703 | | |
694 | 704 | | |
| |||
702 | 712 | | |
703 | 713 | | |
704 | 714 | | |
705 | | - | |
| 715 | + | |
706 | 716 | | |
707 | 717 | | |
708 | 718 | | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | 719 | | |
713 | 720 | | |
714 | 721 | | |
| |||
720 | 727 | | |
721 | 728 | | |
722 | 729 | | |
| 730 | + | |
723 | 731 | | |
724 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
0 commit comments