PR3857
From Masami Hiramatsu
* utt.c (utt_subbuf_start_callback): Use overwrite flag.
* control.c (_stp_ctl_open_cmd): Set overwrite_flag off.
(_stp_ctl_close_cmd): Set overwrite flag on.
_stp_ctl_opens++;
_stp_pid = current->pid;
+ utt_overwrite_flag = 0;
return 0;
}
if (_stp_ctl_opens)
_stp_ctl_opens--;
_stp_pid = 0;
+ if (!_stp_exit_flag)
+ utt_overwrite_flag = 1;
return 0;
}
#include <linux/relay.h>
#include "utt.h"
+int utt_overwrite_flag = 0;
+
static void utt_remove_root(struct utt_trace *utt)
{
if (utt->utt_tree_root) {
{
struct utt_trace *utt;
- if (!relay_buf_full(buf))
+ if (utt_overwrite_flag || !relay_buf_full(buf))
return 1;
utt = buf->chan->private_data;
extern void utt_trace_cleanup(struct utt_trace *utt);
extern int utt_trace_remove(struct utt_trace *utt);
+extern int utt_overwrite_flag;
+
#endif