summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2009-02-06 12:54:15 -0500
committerWilliam Cohen <wcohen@redhat.com>2009-02-06 12:54:15 -0500
commit02a8be39355aeeba2dd873e68ec6527960fc9a12 (patch)
treefcfb952440ec65225fccb6cd5dbf4f9ecca32f50
parentd1e81455651ff70d1b380fd1b63ea0ae9047eb0f (diff)
parent2c48e4162100e7cbc53eeaee13cfbdd538b15380 (diff)
downloadsystemtap-steved-02a8be39355aeeba2dd873e68ec6527960fc9a12.tar.gz
systemtap-steved-02a8be39355aeeba2dd873e68ec6527960fc9a12.tar.xz
systemtap-steved-02a8be39355aeeba2dd873e68ec6527960fc9a12.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
-rw-r--r--ChangeLog4
-rw-r--r--buildrun.cxx3
-rw-r--r--runtime/ChangeLog5
-rw-r--r--runtime/autoconf-procfs-owner.c8
-rw-r--r--runtime/procfs.c6
5 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8442ff14..b411c49e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-06 Frank Ch. Eigler <fche@elastic.org>
+
+ * buildrun.cxx: Add STAPCONF_PROCFS_OWNER test.
+
2009-02-05 Will Cohen <wcohen@redhat.com>
PR9756.
diff --git a/buildrun.cxx b/buildrun.cxx
index 15ba3ae1..69cd6afb 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -1,5 +1,5 @@
// build/run probes
-// Copyright (C) 2005-2008 Red Hat Inc.
+// Copyright (C) 2005-2009 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -122,6 +122,7 @@ compile_pass (systemtap_session& s)
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-synchronize-sched.c, -DSTAPCONF_SYNCHRONIZE_SCHED,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-task-uid.c, -DSTAPCONF_TASK_UID,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-vm-area.c, -DSTAPCONF_VM_AREA,)" << endl;
+ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-procfs-owner.c, -DSTAPCONF_PROCFS_OWNER,)" << endl;
#if 0
/* NB: For now, the performance hit of probe_kernel_read/write (vs. our
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 81a78c4b..5cdcec81 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-06 Frank Ch. Eigler <fche@elastic.org>
+
+ * autoconf-procfs-owner.c: New test.
+ * procfs.c (_stp_mkdir_proc_module, _stp_create_procfs): Use it.
+
2009-02-05 Frank Ch. Eigler <fche@elastic.org>
PR 9740/9816?
diff --git a/runtime/autoconf-procfs-owner.c b/runtime/autoconf-procfs-owner.c
new file mode 100644
index 00000000..d64bf5e8
--- /dev/null
+++ b/runtime/autoconf-procfs-owner.c
@@ -0,0 +1,8 @@
+#include <linux/proc_fs.h>
+
+/* kernel commit 4d38a69c6 */
+
+void bar (void) {
+ struct proc_dir_entry foo;
+ foo.owner = (void*) 0;
+}
diff --git a/runtime/procfs.c b/runtime/procfs.c
index 98d0af98..4011ebfc 100644
--- a/runtime/procfs.c
+++ b/runtime/procfs.c
@@ -1,7 +1,7 @@
/* -*- linux-c -*-
*
* /proc command channels
- * Copyright (C) 2007 Red Hat Inc.
+ * Copyright (C) 2007-2009 Red Hat Inc.
*
* This file is part of systemtap, and is free software. You can
* redistribute it and/or modify it under the terms of the GNU General
@@ -105,8 +105,10 @@ static int _stp_mkdir_proc_module(void)
}
_stp_proc_root = proc_mkdir(THIS_MODULE->name, _stp_proc_stap);
+#ifdef AUTOCONF_PROCFS_OWNER
if (_stp_proc_root != NULL)
_stp_proc_root->owner = THIS_MODULE;
+#endif
_stp_unlock_debugfs();
}
@@ -161,7 +163,9 @@ static int _stp_create_procfs(const char *path, int num)
goto err;
}
_stp_pde[_stp_num_pde++] = last_dir;
+#ifdef AUTOCONF_PROCFS_OWNER
last_dir->owner = THIS_MODULE;
+#endif
last_dir->uid = _stp_uid;
last_dir->gid = _stp_gid;
} else {