<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/super.c, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-16T21:03:26Z</updated>
<entry>
<title>ext4: avoid kernel warning when writing the superblock to a dead device</title>
<updated>2019-01-16T21:03:26Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-12-31T04:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f98cd7a87d06fe4f21f8a48f3318bf576bfcc4e'/>
<id>urn:sha1:3f98cd7a87d06fe4f21f8a48f3318bf576bfcc4e</id>
<content type='text'>
commit e86807862e6880809f191c4cea7f88a489f0ed34 upstream.

The xfstests generic/475 test switches the underlying device with
dm-error while running a stress test.  This results in a large number
of file system errors, and since we can't lock the buffer head when
marking the superblock dirty in the ext4_grp_locked_error() case, it's
possible the superblock to be !buffer_uptodate() without
buffer_write_io_error() being true.

We need to set buffer_uptodate() before we call mark_buffer_dirty() or
this will trigger a WARN_ON.  It's safe to do this since the
superblock must have been properly read into memory or the mount would
have been successful.  So if buffer_uptodate() is not set, we can
safely assume that this happened due to a failed attempt to write the
superblock.

Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: force inode writes when nfsd calls commit_metadata()</title>
<updated>2019-01-09T16:45:58Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-12-19T19:07:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec9639da0bfc8f57ded2f818e57ec0c854bb1516'/>
<id>urn:sha1:ec9639da0bfc8f57ded2f818e57ec0c854bb1516</id>
<content type='text'>
commit fde872682e175743e0c3ef939c89e3c6008a1529 upstream.

Some time back, nfsd switched from calling vfs_fsync() to using a new
commit_metadata() hook in export_operations().  If the file system did
not provide a commit_metadata() hook, it fell back to using
sync_inode_metadata().  Unfortunately doesn't work on all file
systems.  In particular, it doesn't work on ext4 due to how the inode
gets journalled --- the VFS writeback code will not always call
ext4_write_inode().

So we need to provide our own ext4_nfs_commit_metdata() method which
calls ext4_write_inode() directly.

Google-Bug-Id: 121195940
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: avoid declaring fs inconsistent due to invalid file handles</title>
<updated>2019-01-09T16:45:57Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-12-19T17:29:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb2e932e80d7f6f40ed719a1e956fdce0ba96a33'/>
<id>urn:sha1:fb2e932e80d7f6f40ed719a1e956fdce0ba96a33</id>
<content type='text'>
commit 8a363970d1dc38c4ec4ad575c862f776f468d057 upstream.

If we receive a file handle, either from NFS or open_by_handle_at(2),
and it points at an inode which has not been initialized, and the file
system has metadata checksums enabled, we shouldn't try to get the
inode, discover the checksum is invalid, and then declare the file
system as being inconsistent.

This can be reproduced by creating a test file system via "mke2fs -t
ext4 -O metadata_csum /tmp/foo.img 8M", mounting it, cd'ing into that
directory, and then running the following program.

#define _GNU_SOURCE
#include &lt;fcntl.h&gt;

struct handle {
	struct file_handle fh;
	unsigned char fid[MAX_HANDLE_SZ];
};

int main(int argc, char **argv)
{
	struct handle h = {{8, 1 }, { 12, }};

	open_by_handle_at(AT_FDCWD, &amp;h.fh, O_RDONLY);
	return 0;
}

Google-Bug-Id: 120690101
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix possible use after free in ext4_quota_enable</title>
<updated>2019-01-09T16:45:57Z</updated>
<author>
<name>Pan Bian</name>
</author>
<published>2018-12-04T04:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec2222187bdc5f23113e57b6fcd516cd5a2dfa62'/>
<id>urn:sha1:ec2222187bdc5f23113e57b6fcd516cd5a2dfa62</id>
<content type='text'>
commit 61157b24e60fb3cd1f85f2c76a7b1d628f970144 upstream.

The function frees qf_inode via iput but then pass qf_inode to
lockdep_set_quota_inode on the failure path. This may result in a
use-after-free bug. The patch frees df_inode only when it is never used.

Fixes: daf647d2dd5 ("ext4: add lockdep annotations for i_data_sem")
Cc: stable@kernel.org # 4.6
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: add ext4_sb_bread() to disambiguate ENOMEM cases</title>
<updated>2019-01-09T16:45:57Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-11-25T22:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=81313ed2c705d958744882a269bf4a5e3ddec95e'/>
<id>urn:sha1:81313ed2c705d958744882a269bf4a5e3ddec95e</id>
<content type='text'>
commit fb265c9cb49e2074ddcdd4de99728aefdd3b3592 upstream.

Today, when sb_bread() returns NULL, this can either be because of an
I/O error or because the system failed to allocate the buffer.  Since
it's an old interface, changing would require changing many call
sites.

So instead we create our own ext4_sb_bread(), which also allows us to
set the REQ_META flag.

Also fixed a problem in the xattr code where a NULL return in a
function could also mean that the xattr was not found, which could
lead to the wrong error getting returned to userspace.

Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3")
Cc: stable@kernel.org # 2.6.19
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix possible leak of s_journal_flag_rwsem in error path</title>
<updated>2018-11-07T15:56:28Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-07T15:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af18e35bfd01e6d65a5e3ef84ffe8b252d1628c5'/>
<id>urn:sha1:af18e35bfd01e6d65a5e3ef84ffe8b252d1628c5</id>
<content type='text'>
Fixes: c8585c6fcaf2 ("ext4: fix races between changing inode journal ...")
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 4.7
</content>
</entry>
<entry>
<title>ext4: fix possible leak of sbi-&gt;s_group_desc_leak in error path</title>
<updated>2018-11-07T15:32:53Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-11-07T15:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e463084cdb22e0b56b2dfbc50461020409a5fd3'/>
<id>urn:sha1:9e463084cdb22e0b56b2dfbc50461020409a5fd3</id>
<content type='text'>
Fixes: bfe0a5f47ada ("ext4: add more mount time checks of the superblock")
Reported-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 4.18
</content>
</entry>
<entry>
<title>ext4: fix use-after-free race in ext4_remount()'s error path</title>
<updated>2018-10-12T13:28:09Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-10-12T13:28:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33458eaba4dfe778a426df6a19b7aad2ff9f7eec'/>
<id>urn:sha1:33458eaba4dfe778a426df6a19b7aad2ff9f7eec</id>
<content type='text'>
It's possible for ext4_show_quota_options() to try reading
s_qf_names[i] while it is being modified by ext4_remount() --- most
notably, in ext4_remount's error path when the original values of the
quota file name gets restored.

Reported-by: syzbot+a2872d6feea6918008a9@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 3.2+
</content>
</entry>
<entry>
<title>ext4: add new pending reservation mechanism</title>
<updated>2018-10-01T18:17:41Z</updated>
<author>
<name>Eric Whitney</name>
</author>
<published>2018-10-01T18:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1dc0aa46e74a3366e12f426b7caaca477853e9c3'/>
<id>urn:sha1:1dc0aa46e74a3366e12f426b7caaca477853e9c3</id>
<content type='text'>
Add new pending reservation mechanism to help manage reserved cluster
accounting.  Its primary function is to avoid the need to read extents
from the disk when invalidating pages as a result of a truncate, punch
hole, or collapse range operation.

Signed-off-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4</title>
<updated>2018-09-17T07:13:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2018-09-17T07:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad3273d5f1b99d7319a986ab568dcbde2f9e53dd'/>
<id>urn:sha1:ad3273d5f1b99d7319a986ab568dcbde2f9e53dd</id>
<content type='text'>
Ted writes:
	Various ext4 bug fixes; primarily making ext4 more robust against
	maliciously crafted file systems, and some DAX fixes.

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4, dax: set ext4_dax_aops for dax files
  ext4, dax: add ext4_bmap to ext4_dax_aops
  ext4: don't mark mmp buffer head dirty
  ext4: show test_dummy_encryption mount option in /proc/mounts
  ext4: close race between direct IO and ext4_break_layouts()
  ext4: fix online resizing for bigalloc file systems with a 1k block size
  ext4: fix online resize's handling of a too-small final block group
  ext4: recalucate superblock checksum after updating free blocks/inodes
  ext4: avoid arithemetic overflow that can trigger a BUG
  ext4: avoid divide by zero fault when deleting corrupted inline directories
  ext4: check to make sure the rename(2)'s destination is not freed
  ext4: add nonstring annotations to ext4.h
</content>
</entry>
</feed>
