public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] xfs: fix two problem when recovery intents fails
@ 2023-07-15  6:36 Long Li
  2023-07-15  6:36 ` [PATCH v2 1/3] xfs: factor out xfs_defer_pending_abort Long Li
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Long Li @ 2023-07-15  6:36 UTC (permalink / raw)
  To: djwong, david; +Cc: linux-xfs, yi.zhang, houtao1, leo.lilong, yangerkun

This patch set fix two problem when recovery intents fails.

Patches 1-2 fix the possible problem that intent items not released.
When recovery intents, new intents items may be created during recovery
intents. if recovery fails, new intents items may be left in AIL or
leaks.

Patch 3 fix a uaf problem, when recovery intents fails, intent items
may be freed before done item commited.

v2:
 - change xfs_defer_pending_abort to static in patch 1
 - rewrite commit message in patch 2-3
 - rename xfs_defer_ops_capture_free to xfs_defer_ops_capture_abort, and
 add xfs_defer_pending_abort to the start of xfs_defer_ops_capture_abort

Long Li (3):
  xfs: factor out xfs_defer_pending_abort
  xfs: abort intent items when recovery intents fail
  xfs: make sure done item committed before cancel intents

 fs/xfs/libxfs/xfs_defer.c | 28 ++++++++++++++++++----------
 fs/xfs/libxfs/xfs_defer.h |  2 +-
 fs/xfs/xfs_log_recover.c  | 16 ++++++++--------
 3 files changed, 27 insertions(+), 19 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-25 12:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-15  6:36 [PATCH v2 0/3] xfs: fix two problem when recovery intents fails Long Li
2023-07-15  6:36 ` [PATCH v2 1/3] xfs: factor out xfs_defer_pending_abort Long Li
2023-07-19  2:08   ` Darrick J. Wong
2023-07-15  6:36 ` [PATCH v2 2/3] xfs: abort intent items when recovery intents fail Long Li
2023-07-19  2:07   ` Darrick J. Wong
2023-07-15  6:36 ` [PATCH v2 3/3] xfs: make sure done item committed before cancel intents Long Li
2023-07-19  2:19   ` Darrick J. Wong
2023-07-22  2:16     ` Long Li
2023-07-19  6:41   ` Dave Chinner
2023-07-22  1:19     ` Long Li
2023-07-24  1:05       ` Dave Chinner
2023-07-25 12:25         ` Long Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox