git: 256c8c5df2a4 - main - dt_unring_buf: set dtbd_oldest to the start of the first record
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 11 Jan 2022 13:51:41 UTC
The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e commit 256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e Author: Andriy Gapon <avg@FreeBSD.org> AuthorDate: 2022-01-11 13:44:04 +0000 Commit: Andriy Gapon <avg@FreeBSD.org> CommitDate: 2022-01-11 13:44:04 +0000 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 --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;