Skip to content

ext4: fix two journal credit shortfalls behind one syzbot report

William Chuang linux-ext4 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ext4: reserve quota credits in swap_inode_boot_loader()fs/ext4/ioctl.c+6 -11 reply
2/2ext4: reserve an orphan credit for inline data writesfs/ext4/inline.c+6 -11 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Kara
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] ext4: fix two journal credit shortfalls behind one syzbot report

syzbot report e8180f5590685cbc9037 ("WARNING in jbd2_journal_dirty_metadata (4)") collects crashes from two separate paths. Both hit the same WARN:
a handle dirties a new metadata block after its credits are used up.

1. EXT4_IOC_SWAP_BOOT: swap_inode_boot_loader() reserves 2 credits, then updates quota under the same handle (crashes of 15 and 16 Nov).

2. Inline data buffered write with a short user copy:
ext4_generic_write_inline_data() reserves 1 credit, and ext4_write_inline_data_end() then calls ext4_orphan_add() (crashes of 12-14 Nov, x86_64 and arm64, including data=journal).

Both were reproduced on UML at 666539eec ("Merge tag 'assoc-array-fixes-v2'") with small standalone reproducers, before and after each fix; details are in each changelog. One patch per path, so each can be reviewed alone. Both patches carry the same Reported-by tag, and the report closes only when both are applied.

William Chuang (2):
ext4: reserve quota credits in swap_inode_boot_loader()
ext4: reserve an orphan credit for inline data writes

 fs/ext4/inline.c | 7 ++++++-
 fs/ext4/ioctl.c  | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0