Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: chandan.babu@gmail.com, sandeen@sandeen.net,
	Dave Chinner <dchinner@redhat.com>,
	ritesh.list@gmail.com, tglx@linutronix.de, peterz@infradead.org,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCHSET v2 0/4] xfs: fix cpu hotplug mess
Date: Wed, 30 Aug 2023 10:14:25 +1000	[thread overview]
Message-ID: <ZO6J4W9msOixUk05@dread.disaster.area> (raw)
In-Reply-To: <169335040678.3522698.12786707653439539265.stgit@frogsfrogsfrogs>

On Tue, Aug 29, 2023 at 04:06:46PM -0700, Darrick J. Wong wrote:
> Hi all,
> 
> Ritesh and Eric separately reported crashes in XFS's hook function for
> CPU hot remove if the remove event races with a filesystem being
> mounted.  I also noticed via generic/650 that once in a while the log
> will shut down over an apparent overrun of a transaction reservation;
> this turned out to be due to CIL percpu list aggregation failing to pick
> up the percpu list items from a dying CPU.
> 
> Either way, the solution here is to eliminate the need for a CPU dying
> hook by using a private cpumask to track which CPUs have added to their
> percpu lists directly, and iterating with that mask.  This fixes the log
> problems and (I think) solves a theoretical UAF bug in the inodegc code
> too.
> 
> v2: fix a few put_cpu uses, add necessary memory barriers, and use
>     atomic cpumask operations
> 
> If you're going to start using this code, I strongly recommend pulling
> from my git trees, which are linked below.
> 
> This has been lightly tested with fstests.  Enjoy!
> Comments and questions are, as always, welcome.

Series looks good. Removes a bunch of code and makes things more
reliable, so what's not to like about it?

Reviewed-by: Dave Chinner <dchinner@redhat.com>

-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2023-08-30  1:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-29 23:06 [PATCHSET v2 0/4] xfs: fix cpu hotplug mess Darrick J. Wong
2023-08-29 23:06 ` [PATCH 1/4] xfs: fix per-cpu CIL structure aggregation racing with dying cpus Darrick J. Wong
2023-08-29 23:06 ` [PATCH 2/4] xfs: use per-mount cpumask to track nonempty percpu inodegc lists Darrick J. Wong
2023-08-29 23:07 ` [PATCH 3/4] xfs: remove the all-mounts list Darrick J. Wong
2023-08-29 23:07 ` [PATCH 4/4] xfs: remove CPU hotplug infrastructure Darrick J. Wong
2023-08-30  0:14 ` Dave Chinner [this message]

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=ZO6J4W9msOixUk05@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=chandan.babu@gmail.com \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=ritesh.list@gmail.com \
    --cc=sandeen@sandeen.net \
    --cc=tglx@linutronix.de \
    /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