+2005-10-17 Martin Hunt <hunt@redhat.com>
+
+ * transport.c (_stp_handle_start): Grab semaphore before
+ calling probe_start() and release after it is done.
+ (_stp_handle_exit): Ditto for exiting. This prevents
+ exiting before probe_start() is finished.
+
2005-10-14 Tom Zanussi <zanussi@us.ibm.com>
* relayfs.h: Add ifdef'ed relayfs_fs.h include for mainline
static struct dentry *_stp_dir;
#endif
+static DECLARE_MUTEX(_stp_start_mutex);
+
static int _stp_dpid;
static int _stp_pid;
void _stp_handle_start (struct transport_start *st)
{
kbug ("stp_handle_start pid=%d\n", st->pid);
+
+ down (&_stp_start_mutex);
st->pid = probe_start();
+ up (&_stp_start_mutex);
+
if (st->pid < 0)
_stp_exit_called = 1;
_stp_transport_send(STP_START, st, sizeof(*st));
*/
static void _stp_handle_exit (void *data)
{
+ down (&_stp_start_mutex);
_stp_cleanup_and_exit(0);
+ up (&_stp_start_mutex);
}
/**