diff options
author | hunt <hunt> | 2005-08-19 18:29:21 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-08-19 18:29:21 +0000 |
commit | efc364eebf15dd7e8b6c93e155af83b6d3971752 (patch) | |
tree | e47c43181a2bba7d40bde4de14f074c0bfddc5cd /runtime/transport/procfs.c | |
parent | d1b5c3064d3932a23bf2eb0ae01555ed8b901255 (diff) | |
download | systemtap-steved-efc364eebf15dd7e8b6c93e155af83b6d3971752.tar.gz systemtap-steved-efc364eebf15dd7e8b6c93e155af83b6d3971752.tar.xz systemtap-steved-efc364eebf15dd7e8b6c93e155af83b6d3971752.zip |
2005-08-19 Martin Hunt <hunt@redhat.com>
* transport.c (_stp_cmd_handler): Remove. This was used by
stp-control.
* procfs.c (_stp_proc_write_cmd): Call schedule_work() instead
of running _stp_exit_handler immediately. Fixes a problem where
the module couldn't exit if all the output buffers were full.
Set .owner for the filesystem entries.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r-- | runtime/transport/procfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index 2e0e8e6c..8af2d018 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -55,6 +55,7 @@ static ssize_t _stp_proc_write (struct file *file, const char __user *buf, } static struct file_operations _stp_proc_fops = { + .owner = THIS_MODULE, .read = _stp_proc_read, .write = _stp_proc_write, }; @@ -87,7 +88,10 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf, break; } case STP_EXIT: - _stp_handle_exit(NULL); + /* Cannot call _stp_handle_exit() directly here */ + /* because the buffers may be full and stpd won't be able */ + /* to empty them until this handler returns. */ + schedule_work (&stp_exit); break; case STP_TRANSPORT_INFO: { @@ -191,6 +195,7 @@ _stp_proc_read_cmd (struct file *file, char __user *buf, size_t count, loff_t *p static struct file_operations _stp_proc_fops_cmd = { + .owner = THIS_MODULE, .read = _stp_proc_read_cmd, .write = _stp_proc_write_cmd, // .poll = _stp_proc_poll_cmd |