Repository navigation
Commit e2912b0
tracing: Change event_filter_read/write to verify i_private != NULL
event_filter_read/write() are racy, ftrace_event_call can be already
freed by trace_remove_event_call() callers.
1. Shift mutex_lock(event_mutex) from print/apply_event_filter to
the callers.
2. Change the callers, event_filter_read() and event_filter_write()
to read i_private under this mutex and abort if it is NULL.
This fixes nothing, but now we can change debugfs_remove("filter")
callers to nullify ->i_private and fix the the problem.
Link: http://lkml.kernel.org/r/20130726172540.GA3619@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>1 parent bc6f6b0 commit e2912b0
2 files changed
Lines changed: 25 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
983 | | - | |
| 983 | + | |
984 | 984 | | |
985 | | - | |
| 985 | + | |
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| 991 | + | |
991 | 992 | | |
992 | 993 | | |
993 | 994 | | |
994 | 995 | | |
995 | 996 | | |
996 | | - | |
997 | | - | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
998 | 1005 | | |
999 | 1006 | | |
1000 | 1007 | | |
| |||
1005 | 1012 | | |
1006 | 1013 | | |
1007 | 1014 | | |
1008 | | - | |
| 1015 | + | |
1009 | 1016 | | |
1010 | | - | |
| 1017 | + | |
1011 | 1018 | | |
1012 | 1019 | | |
1013 | 1020 | | |
| |||
1022 | 1029 | | |
1023 | 1030 | | |
1024 | 1031 | | |
1025 | | - | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
1026 | 1038 | | |
1027 | 1039 | | |
1028 | 1040 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| 640 | + | |
640 | 641 | | |
641 | 642 | | |
642 | | - | |
| 643 | + | |
643 | 644 | | |
644 | | - | |
645 | | - | |
646 | 645 | | |
647 | 646 | | |
648 | 647 | | |
649 | 648 | | |
650 | | - | |
651 | 649 | | |
652 | 650 | | |
653 | 651 | | |
| |||
1841 | 1839 | | |
1842 | 1840 | | |
1843 | 1841 | | |
| 1842 | + | |
1844 | 1843 | | |
1845 | 1844 | | |
1846 | 1845 | | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
| 1846 | + | |
1850 | 1847 | | |
1851 | 1848 | | |
1852 | 1849 | | |
1853 | 1850 | | |
1854 | 1851 | | |
1855 | | - | |
| 1852 | + | |
1856 | 1853 | | |
1857 | 1854 | | |
1858 | 1855 | | |
1859 | 1856 | | |
1860 | | - | |
| 1857 | + | |
1861 | 1858 | | |
1862 | 1859 | | |
1863 | 1860 | | |
| |||
1884 | 1881 | | |
1885 | 1882 | | |
1886 | 1883 | | |
1887 | | - | |
1888 | | - | |
1889 | 1884 | | |
1890 | 1885 | | |
1891 | 1886 | | |
| |||
0 commit comments