From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: [pve-devel] applied: [PATCH cluster 2/2] clusterlog: fix segfault / wrong iteration bounds
Date: Wed, 15 Dec 2021 15:56:24 +0100 [thread overview]
Message-ID: <10f1c6bd-be42-5db9-2570-e9f5f4cda968@proxmox.com> (raw)
In-Reply-To: <20211214101912.3509825-2-f.gruenbichler@proxmox.com>
On 14.12.21 11:19, Fabian Grünbichler wrote:
...
> note that the actual sizes of the entries are not relevant, the
> requirements are:
> - entry before last wrap-around must be big enough that entry of current
> index can overtake it without another wrap-around
> - method that does iteration must be called before next wrap-around
>
> the fix is obviously trivial once the issue became apparent - when
> wrapping around during iteration, additionally check that we are not
> jumping across the red zone into already invalidated parts of data.
>
> clusterlog_merge is technically not affected since it aborts before a
> wrap-around anyway, but it doesn't hurt to have the checks consistently
> in case this ever changes.
>
> thanks to @kev1904 on our community forums for reporting and providing the data
> to nail the cause down fast!
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> data/src/logger.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
>
applied, many thanks!!
next prev parent reply other threads:[~2021-12-15 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 10:19 [pve-devel] [PATCH cluster 1/2] clusterlog: segfault reproducer Fabian Grünbichler
2021-12-14 10:19 ` [pve-devel] [PATCH cluster 2/2] clusterlog: fix segfault / wrong iteration bounds Fabian Grünbichler
2021-12-15 14:56 ` Thomas Lamprecht [this message]
2021-12-15 14:55 ` [pve-devel] applied: [PATCH cluster 1/2] clusterlog: segfault reproducer Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10f1c6bd-be42-5db9-2570-e9f5f4cda968@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.