From a78b2748049f260f365a3161d3aea0b8f9499a2d Mon Sep 17 00:00:00 2001 From: hunt Date: Sat, 25 Feb 2006 10:18:39 +0000 Subject: 2006-02-25 Martin Hunt * procfs.c (_stp_proc_write_cmd): Check return code for _stp_transport_open(). * transport.c (_stp_transport_write): This function can now sleep because it is (_stp_handle_start): Don't use a mutex when a simple atomic will do. (_stp_work_queue): Check atomic to see if probe_start() has finished before attempting exit. (_stp_transport_close): PR2391. Cancel work queue. (_stp_transport_init): If _stp_register_procfs() fails, return an error code. * transport.txt: New file. Documents transport initialization and shutdown sequence. --- runtime/transport/procfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/transport/procfs.c') diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index d083fb64..b878a0f5 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -103,7 +103,8 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf, return 0; if (copy_from_user (&ti, &buf[4], sizeof(struct transport_info))) return -EFAULT; - _stp_transport_open (&ti); + if (_stp_transport_open (&ti) < 0) + return -1; break; } default: -- cgit