This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/11078] New: avoid procfs race condition


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]