diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-07-05 11:36:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-04 21:58:38 -0700 |
commit | f35869d69b65ac9323a0d7ee13c062e1636d4a1b (patch) | |
tree | 4923438fa988ce2602b00f2607d8b8d58c39da00 /Documentation/kobject.txt | |
parent | a3b573350c48edd314b4bdd4f3025b4fda13f0dd (diff) | |
download | kernel_samsung_smdk4412-f35869d69b65ac9323a0d7ee13c062e1636d4a1b.zip kernel_samsung_smdk4412-f35869d69b65ac9323a0d7ee13c062e1636d4a1b.tar.gz kernel_samsung_smdk4412-f35869d69b65ac9323a0d7ee13c062e1636d4a1b.tar.bz2 |
tracing: Fix bug when reading system filters on module removal
commit e9dbfae53eeb9fc3d4bb7da3df87fa9875f5da02 upstream.
The event system is freed when its nr_events is set to zero. This happens
when a module created an event system and then later the module is
removed. Modules may share systems, so the system is allocated when
it is created and freed when the modules are unloaded and all the
events under the system are removed (nr_events set to zero).
The problem arises when a task opened the "filter" file for the
system. If the module is unloaded and it removed the last event for
that system, the system structure is freed. If the task that opened
the filter file accesses the "filter" file after the system has
been freed, the system will access an invalid pointer.
By adding a ref_count, and using it to keep track of what
is using the event system, we can free it after all users
are finished with the event system.
Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation/kobject.txt')
0 files changed, 0 insertions, 0 deletions