diff options
author | Jim Keniston <jkenisto@us.ibm.com> | 2008-10-03 15:58:36 -0700 |
---|---|---|
committer | Jim Keniston <jkenisto@us.ibm.com> | 2008-10-03 15:58:36 -0700 |
commit | 46fc0cc436ba4b2418082c1424f2ce205d35c95d (patch) | |
tree | 5c5e112f396cb5a55805540a07b5c8c19d203e2d | |
parent | 6c492b1e782c551baf4c05c20939358a8da42964 (diff) | |
parent | 0efe0e840c3069f29b7dfb45fc1c4ee118fe473c (diff) | |
download | systemtap-steved-46fc0cc436ba4b2418082c1424f2ce205d35c95d.tar.gz systemtap-steved-46fc0cc436ba4b2418082c1424f2ce205d35c95d.tar.xz systemtap-steved-46fc0cc436ba4b2418082c1424f2ce205d35c95d.zip |
Merge branch 'master' of ssh://kenistoj@sources.redhat.com/git/systemtap
-rw-r--r-- | runtime/ChangeLog | 9 | ||||
-rw-r--r-- | runtime/procfs.c | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index e22bee26..44147429 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,12 @@ +2008-10-03 Mark Wielaard <mjw@redhat.com> + + * procfs.c (_stp_rmdir_proc_module): Remove debug output from warning. + +2008-10-03 Mark Wielaard <mjw@redhat.com> + + * procfs.c (_stp_rmdir_proc_module): Usage count warning + depends on kernel version. + 2008-10-02 Tim Moore <timoore@redhat.com> * addr-map.c (add_bad_addr_entry): Fix bugs in allocating a new diff --git a/runtime/procfs.c b/runtime/procfs.c index 1b1d5447..0fe22aba 100644 --- a/runtime/procfs.c +++ b/runtime/procfs.c @@ -24,13 +24,20 @@ static struct proc_dir_entry *_stp_proc_root = NULL; void _stp_close_procfs(void); +// 2.6.24 fixed proc_dir_entry refcounting. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) +#define LAST_ENTRY_COUNT 0 +#else +#define LAST_ENTRY_COUNT 1 +#endif + /* * Removes /proc/systemtap/{module_name} and /proc/systemtap (if empty) */ void _stp_rmdir_proc_module(void) { if (_stp_proc_root && _stp_proc_root->subdir == NULL) { - if (atomic_read(&_stp_proc_root->count)) + if (atomic_read(&_stp_proc_root->count) != LAST_ENTRY_COUNT) _stp_warn("Removal of /proc/systemtap/%s\nis deferred until it is no longer in use.\n" "Systemtap module removal will block.\n", THIS_MODULE->name); remove_proc_entry(THIS_MODULE->name, _stp_proc_stap); |