All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: cem@kernel.org, hch@lst.de, stable@vger.kernel.org,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/5] xfs: always set xfs_healthmon::first_event when inserting at front of list
Date: Tue, 25 Aug 2026 08:40:17 +0200	[thread overview]
Message-ID: <20260825064017.GA24532@lst.de> (raw)
In-Reply-To: <178760941102.944364.11828316232110118627.stgit@frogsfrogsfrogs>

On Mon, Aug 24, 2026 at 10:36:12PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> LOLLM complains that __xfs_healthmon_insert purports to insert a
> xfs_healthmon_event event at the start of the event list, but neglects
> to update first_event to point to the unmount event if there were
> already events in the queue.  That results in list corruption, so let's
> fix this problem.

I can't really follow this..

> diff --git a/fs/xfs/xfs_healthmon.c b/fs/xfs/xfs_healthmon.c
> index d8b95af33a3e9f..166ef0d5864486 100644
> --- a/fs/xfs/xfs_healthmon.c
> +++ b/fs/xfs/xfs_healthmon.c
> @@ -276,8 +276,7 @@ __xfs_healthmon_insert(
>  	event->time_ns = (now.tv_sec * NSEC_PER_SEC) + now.tv_nsec;
>  
>  	event->next = hm->first_event;
> -	if (!hm->first_event)
> -		hm->first_event = event;
> +	hm->first_event = event;
>  	if (!hm->last_event)
>  		hm->last_event = event;

event is the newly inserted event.  We want to queue it at the
head of the list (why, btw?).  The next point in event points to
first_event (which can be NULL).  And first should always point
to event, otherwise we potentially never queue anything up?  I.e.
we never ever actually set first?  Not sure how that is related
to umount.

Maybe this should just use standard list_head-based lists even
if they waste an extra pointer in the event structure?


  reply	other threads:[~2026-08-25  6:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  5:34 [PATCHSET 2/2] xfs: LLM-inspired bug fixes, part 8 Darrick J. Wong
2026-08-25  5:36 ` [PATCH 1/5] xfs: always set xfs_healthmon::first_event when inserting at front of list Darrick J. Wong
2026-08-25  6:40   ` Christoph Hellwig [this message]
2026-08-25 18:33     ` Darrick J. Wong
2026-08-26  4:48       ` Christoph Hellwig
2026-08-26  4:54         ` Darrick J. Wong
2026-08-26  5:10           ` Christoph Hellwig
2026-08-25  5:36 ` [PATCH 2/5] xfs: check healthmon outbuffer space correctly Darrick J. Wong
2026-08-25  6:44   ` Christoph Hellwig
2026-08-25 18:36     ` Darrick J. Wong
2026-08-25  5:36 ` [PATCH 3/5] xfs: bump lost_prev_errors if we lose even the healthmon lost event Darrick J. Wong
2026-08-25  6:45   ` Christoph Hellwig
2026-08-25  5:36 ` [PATCH 4/5] xfs: report nonexistent parents as a filesystem corruption Darrick J. Wong
2026-08-25  6:46   ` Christoph Hellwig
2026-08-25  5:37 ` [PATCH 5/5] xfs: destroy seen inode bitmap when we fail to add a dirpath Darrick J. Wong
2026-08-25  6:48   ` Christoph Hellwig

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=20260825064017.GA24532@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=stable@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 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.