Skip to content

ext4: clean up ea_inode handling

Theodore Ts'o linux-ext4 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4ext4: add EA_INODE checking to ext4_iget()fs/ext4/ext4.h fs/ext4/inode.c fs/ext4/xattr.c+35 -350 replies
2/4ext4: set lockdep subclass for the ea_inode in ext4_xattr_inode_cache_find()fs/ext4/xattr.c+1 -00 replies
3/4ext4: disallow ea_inodes with extended attributesfs/ext4/inode.c+3 -00 replies
4/4ext4: add lockdep annotations for i_data_sem for ea_inode'sfs/ext4/ext4.h fs/ext4/xattr.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] ext4: clean up ea_inode handling

This fixes a number of problems with ea_inode handling which were pointed out by syzbot. The first and third add some additional checking for invalid / maliciously fuzzed file systems. The second and fourth patch adds some lockdep annotations to avoid some false positive reports from lockdep.

There is still one remaining syzbot report[1] relating to ea_inodes not handled by this patch series, and that is an apparently deadlock which happens when a kernel thread is freeing an ea_inode racing with another thread which is trying to find the mbcache entry (presumably with the intent of reusing it). The problem is apparently hard to reproduce; it's only been hit 4 times, and there is no C reproducer; just a syzkaller reproducer. So we'll leave that for another day/

[1] https://syzkaller.appspot.com/bug?extid=38e6635a03c83c76297a

    INFO: task hung in ext4_evict_ea_inode

Theodore Ts'o (4):
ext4: add EA_INODE checking to ext4_iget()
ext4: set lockdep subclass for the ea_inode in
ext4_xattr_inode_cache_find()
ext4: disallow ea_inodes with extended attributes
ext4: add lockdep annotations for i_data_sem for ea_inode's

 fs/ext4/ext4.h  |  5 ++++-
 fs/ext4/inode.c | 34 +++++++++++++++++++++++++++++-----
 fs/ext4/xattr.c | 41 ++++++++++++-----------------------------
 3 files changed, 45 insertions(+), 35 deletions(-)
Signature · 1 line
2.31.0