summaryrefslogtreecommitdiffstats
path: root/runtime/transport
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-05-07 13:10:32 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-05-07 13:10:32 -0400
commit9204dcfbe16061f799068eeacff5dc68ad33e523 (patch)
treed0b0d6b9a850527b6ddf756de8846023933a4f18 /runtime/transport
parent49628242c239feb617b838bb5d90488386645bd6 (diff)
parent12603f28dc1abdfdff43c53b939ebb528382512e (diff)
downloadsystemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.tar.gz
systemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.tar.xz
systemtap-steved-9204dcfbe16061f799068eeacff5dc68ad33e523.zip
Merge branch 'master' into pr6429-comp-unwindsyms
* master: PR444886: add .../build/... to default debuginfo search path More signal cleanup. Fix problem handling SIG_CHLD Cleanup signal handling for staprun. PR6481: timer reset needs irqs reenabled Made runtime/task_finder.c improvements. PR6474: use position-independent-executable security c/ld-flags for stap* binaries 2008-05-01 William Cohen <wcohen@redhat.com> add git commit summary guidelines PR5648: Fix unaligned access warning on ia64. PR6008: Increase the limitation of the buffer size to 4095MB. PR5645: Fix sub-buffer size calculation and debug messages.
Diffstat (limited to 'runtime/transport')
-rw-r--r--runtime/transport/ChangeLog6
-rw-r--r--runtime/transport/transport.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index b0f2aee8..9d0ba162 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-30 Masami Hiramatsu <mhiramat@redhat.com>
+
+ PR 5645
+ * transport.c (_stp_transport_init): Fix subbuffer size calculation
+ overflow.
+
2008-04-21 hunt <hunt@redhat.com>
* control.c (_stp_ctl_write): Return len + sizeof(int) so
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
index 1f9a1667..a4e4e652 100644
--- a/runtime/transport/transport.c
+++ b/runtime/transport/transport.c
@@ -225,7 +225,11 @@ int _stp_transport_init(void)
if (_stp_bufsize) {
unsigned size = _stp_bufsize * 1024 * 1024;
- _stp_subbuf_size = ((size >> 2) + 1) * 65536;
+ _stp_subbuf_size = 65536;
+ while (size / _stp_subbuf_size > 64 &&
+ _stp_subbuf_size < 1024 * 1024) {
+ _stp_subbuf_size <<= 1;
+ }
_stp_nsubbufs = size / _stp_subbuf_size;
dbug_trans(1, "Using %d subbufs of size %d\n", _stp_nsubbufs, _stp_subbuf_size);
}