linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 3/9] xfs: validate attr leaf buffer owners
Date: Wed, 28 Feb 2024 07:57:28 -0800	[thread overview]
Message-ID: <Zd9X6EqqX3hi56I4@infradead.org> (raw)
In-Reply-To: <170900013143.938940.11677015146987204748.stgit@frogsfrogsfrogs>

>  	trace_xfs_attr_node_list(context);
> @@ -330,6 +339,15 @@ xfs_attr_node_list(
>  			case XFS_ATTR_LEAF_MAGIC:
>  			case XFS_ATTR3_LEAF_MAGIC:
>  				leaf = bp->b_addr;
> +				fa = xfs_attr3_leaf_header_check(bp,
> +						dp->i_ino);
> +				if (fa) {
> +					__xfs_buf_mark_corrupt(bp, fa);
> +					xfs_trans_brelse(context->tp, bp);
> +					xfs_dirattr_mark_sick(dp, XFS_ATTR_FORK);

Nit: overly long line here.

Note: this function would really benefit from factoring out the
body inside the "if (bp)" into a helper to make it more readable..

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2024-02-28 15:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27  2:18 [PATCHSET v29.4 06/13] xfs: set and validate dir/attr block owners Darrick J. Wong
2024-02-27  2:26 ` [PATCH 1/9] xfs: add an explicit owner field to xfs_da_args Darrick J. Wong
2024-02-28 15:54   ` Christoph Hellwig
2024-02-27  2:26 ` [PATCH 2/9] xfs: use the xfs_da_args owner field to set new dir/attr block owner Darrick J. Wong
2024-02-28 15:54   ` Christoph Hellwig
2024-02-27  2:27 ` [PATCH 3/9] xfs: validate attr leaf buffer owners Darrick J. Wong
2024-02-28 15:57   ` Christoph Hellwig [this message]
2024-02-28 17:41     ` Darrick J. Wong
2024-02-27  2:27 ` [PATCH 4/9] xfs: validate attr remote value " Darrick J. Wong
2024-02-28 15:57   ` Christoph Hellwig
2024-02-27  2:27 ` [PATCH 5/9] xfs: validate dabtree node " Darrick J. Wong
2024-02-28 15:58   ` Christoph Hellwig
2024-02-27  2:27 ` [PATCH 6/9] xfs: validate directory leaf " Darrick J. Wong
2024-02-28 15:58   ` Christoph Hellwig
2024-02-27  2:28 ` [PATCH 7/9] xfs: validate explicit directory data " Darrick J. Wong
2024-02-28 15:58   ` Christoph Hellwig
2024-02-27  2:28 ` [PATCH 8/9] xfs: validate explicit directory block " Darrick J. Wong
2024-02-28 15:59   ` Christoph Hellwig
2024-02-27  2:28 ` [PATCH 9/9] xfs: validate explicit directory free block owners Darrick J. Wong
2024-02-28 15:59   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2023-12-31 19:45 [PATCHSET v29.0 21/40] xfsprogs: set and validate dir/attr " Darrick J. Wong
2023-12-31 22:33 ` [PATCH 3/9] xfs: validate attr leaf buffer owners Darrick J. Wong
2023-12-31 19:30 [PATCHSET v29.0 19/28] xfs: set and validate dir/attr block owners Darrick J. Wong
2023-12-31 20:33 ` [PATCH 3/9] xfs: validate attr leaf buffer owners Darrick J. Wong
2023-05-26  0:35 [PATCHSET v25.0 0/9] xfs: set and validate dir/attr block owners Darrick J. Wong
2023-05-26  1:31 ` [PATCH 3/9] xfs: validate attr leaf buffer owners Darrick J. Wong
2022-12-30 22:14 [PATCHSET v24.0 0/9] xfs: set and validate dir/attr block owners Darrick J. Wong
2022-12-30 22:14 ` [PATCH 3/9] xfs: validate attr leaf buffer owners 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=Zd9X6EqqX3hi56I4@infradead.org \
    --to=hch@infradead.org \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --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;
as well as URLs for NNTP newsgroup(s).