aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2022-01-11 13:44:04 +0000
committerAndriy Gapon <avg@FreeBSD.org>2022-02-08 16:16:36 +0000
commit36dbd166887dd498a2707130a1f6c90583d36fc6 (patch)
tree22c6cdc37c8b803689f36937cf2863f0dc7cd339
parentb76c310366878ff100c86a303bea98cb7664b08d (diff)
dt_unring_buf: set dtbd_oldest to the start of the first record
It was set to the start of the buffer and that can be different from the start of teh first record because of a misalignment. This change follows the example of dt_realloc_buf(). (cherry picked from commit 256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e)
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
index 62c120388b18..79b22b27ff1b 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c
@@ -2621,7 +2621,7 @@ dt_unring_buf(dtrace_hdl_t *dtp, dtrace_bufdesc_t *buf)
bcopy(buf->dtbd_data, ndp, buf->dtbd_oldest);
dt_free(dtp, buf->dtbd_data);
- buf->dtbd_oldest = 0;
+ buf->dtbd_oldest = misalign;
buf->dtbd_data = newdata;
buf->dtbd_size += misalign;