diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2022-01-11 13:44:04 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2022-01-11 13:44:04 +0000 |
commit | 256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e (patch) | |
tree | 82b925fc36eb21e208e7a953951649068db95aff | |
parent | 75bc7150f4b87e14da13e2e96da9cdf59a5723cf (diff) | |
download | src-256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e.tar.gz src-256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e.zip |
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().
Reviewed by: tsoome, markj
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D33649
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c | 2 |
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 811c88bbf0ad..862d4b9222d7 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; |