public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>, Christoph Hellwig <hch@infradead.org>
Subject: [PATCH] xfs_logprint: fix pointer bug
Date: Tue, 9 Dec 2025 12:57:38 -0800	[thread overview]
Message-ID: <20251209205738.GY89472@frogsfrogsfrogs> (raw)

From: Darrick J. Wong <djwong@kernel.org>

generic/055 captures a crash in xfs_logprint due to an incorrect
refactoring trying to increment a pointer-to-pointer whereas before it
incremented a pointer.

Fixes: 5a9b7e95140893 ("logprint: factor out a xlog_print_op helper")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 logprint/log_misc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/logprint/log_misc.c b/logprint/log_misc.c
index 16353ebd728f35..8e0589c161b871 100644
--- a/logprint/log_misc.c
+++ b/logprint/log_misc.c
@@ -992,7 +992,7 @@ xlog_print_op(
 			printf("0x%02x ", (unsigned int)**ptr);
 			if (n % 16 == 15)
 				printf("\n");
-			ptr++;
+			(*ptr)++;
 		}
 		printf("\n");
 		return true;

             reply	other threads:[~2025-12-09 20:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 20:57 Darrick J. Wong [this message]
2025-12-10  5:25 ` [PATCH] xfs_logprint: fix pointer bug Christoph Hellwig
2025-12-10  6:26   ` Darrick J. Wong
2025-12-10  6:28     ` Christoph Hellwig
2025-12-10 11:10 ` Andrey Albershteyn
2025-12-10 15:44   ` Darrick J. Wong

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=20251209205738.GY89472@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox