This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/11078] New: avoid procfs race condition
- From: "dsmith at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 10 Dec 2009 17:07:41 -0000
- Subject: [Bug runtime/11078] New: avoid procfs race condition
- Reply-to: sourceware-bugzilla at sourceware dot org
Using create_proc_entry() + ->proc_fops assignment is racy because
->proc_fops will be NULL for some time. To avoid this, we need to use
proc_create().
This would change something like:
struct proc_dir_entry *entry;
entry = create_proc_entry("foo", 0, NULL);
if (entry)
entry->proc_fops = &file_ops;
To something like:
struct proc_dir_entry *entry;
entry = proc_create("foo", 0, NULL, &file_ops);
This will require re-architecting the _stp_create_procfs() runtime function (in
runtime/procfs.c) a bit to take a fops argument.
--
Summary: avoid procfs race condition
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: runtime
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: dsmith at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11078
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.