Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Feb 2022 16:16:17 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cbc3c3f0d79f - stable/13 - dt_unring_buf: set dtbd_oldest to the start of the first record
Message-ID:  <202202081616.218GGHnL001896@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=cbc3c3f0d79fcd067111823996160fb7b6afce60

commit cbc3c3f0d79fcd067111823996160fb7b6afce60
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2022-01-11 13:44:04 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2022-02-08 16:15:59 +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().
    
    (cherry picked from commit 256c8c5df2a4bdd43afd9ec5a2f8be9374284e1e)
---
 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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202081616.218GGHnL001896>