Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext4: fix race writing to an inline_data file while its xattrs are ch… #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 22, 2021

  1. ext4: fix race writing to an inline_data file while its xattrs are ch…

    …anging
    
    commit a54c4613dac1500b40e4ab55199f7c51f028e848 upstream.
    
    The location of the system.data extended attribute can change whenever
    xattr_sem is not taken.  So we need to recalculate the i_inline_off
    field since it mgiht have changed between ext4_write_begin() and
    ext4_write_end().
    
    This means that caching i_inline_off is probably not helpful, so in
    the long run we should probably get rid of it and shrink the in-memory
    ext4 inode slightly, but let's fix the race the simple way for now.
    
    Cc: stable@kernel.org
    Fixes: f19d587 ("ext4: add normal write support for inline data")
    Reported-by: syzbot+13146364637c7363a7de@syzkaller.appspotmail.com
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    tytso authored and JeevakaPrabu committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    82f3ef5 View commit details
    Browse the repository at this point in the history