<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/resize.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-09T16:45:57Z</updated>
<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 EXT4_IOC_GROUP_ADD ioctl</title>
<updated>2019-01-09T16:45:57Z</updated>
<author>
<name>ruippan (潘睿)</name>
</author>
<published>2018-12-04T06:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33338ad8cbef78ce5d45734b707fde219c33a429'/>
<id>urn:sha1:33338ad8cbef78ce5d45734b707fde219c33a429</id>
<content type='text'>
commit e647e29196b7f802f8242c39ecb7cc937f5ef217 upstream.

Commit e2b911c53584 ("ext4: clean up feature test macros with
predicate functions") broke the EXT4_IOC_GROUP_ADD ioctl.  This was
not noticed since only very old versions of resize2fs (before
e2fsprogs 1.42) use this ioctl.  However, using a new kernel with an
enterprise Linux userspace will cause attempts to use online resize to
fail with "No reserved GDT blocks".

Fixes: e2b911c53584 ("ext4: clean up feature test macros with predicate...")
Cc: stable@kernel.org # v4.4
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: ruippan (潘睿) &lt;ruippan@tencent.com&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: avoid possible double brelse() in add_new_gdb() on error path</title>
<updated>2018-11-06T22:18:17Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2018-11-06T22:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f32c38b4662312dd3c5f113d8bdd459887fb773'/>
<id>urn:sha1:4f32c38b4662312dd3c5f113d8bdd459887fb773</id>
<content type='text'>
Fixes: b40971426a83 ("ext4: add error checking to calls to ...")
Reported-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@kernel.org # 2.6.38
</content>
</entry>
<entry>
<title>ext4: fix possible inode leak in the retry loop of ext4_resize_fs()</title>
<updated>2018-11-06T21:20:40Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-06T21:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db6aee62406d9fbb53315fcddd81f1dc271d49fa'/>
<id>urn:sha1:db6aee62406d9fbb53315fcddd81f1dc271d49fa</id>
<content type='text'>
Fixes: 1c6bd7173d66 ("ext4: convert file system to meta_bg if needed ...")
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 # 3.7
</content>
</entry>
<entry>
<title>ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing</title>
<updated>2018-11-06T21:16:01Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-06T21:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f348e2241fb73515d65b5d77dd9c174128a7fbf2'/>
<id>urn:sha1:f348e2241fb73515d65b5d77dd9c174128a7fbf2</id>
<content type='text'>
Fixes: 117fff10d7f1 ("ext4: grow the s_flex_groups array as needed ...")
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 # 3.7
</content>
</entry>
<entry>
<title>ext4: add missing brelse() update_backups()'s error path</title>
<updated>2018-11-03T21:11:19Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T21:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea0abbb648452cdb6e1734b702b6330a7448fcf8'/>
<id>urn:sha1:ea0abbb648452cdb6e1734b702b6330a7448fcf8</id>
<content type='text'>
Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3")
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 # 2.6.19
</content>
</entry>
<entry>
<title>ext4: add missing brelse() add_new_gdb_meta_bg()'s error path</title>
<updated>2018-11-03T20:50:08Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0'/>
<id>urn:sha1:61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0</id>
<content type='text'>
Fixes: 01f795f9e0d6 ("ext4: add online resizing support for meta_bg ...")
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 # 3.7
</content>
</entry>
<entry>
<title>ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path</title>
<updated>2018-11-03T20:22:10Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cea5794122125bf67559906a0762186cf417099c'/>
<id>urn:sha1:cea5794122125bf67559906a0762186cf417099c</id>
<content type='text'>
Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...")
Cc: stable@kernel.org # 3.3
Signed-off-by: Vasily Averin &lt;vvs@virtuozzo.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: avoid potential extra brelse in setup_new_flex_group_blocks() </title>
<updated>2018-11-03T20:13:17Z</updated>
<author>
<name>Vasily Averin</name>
</author>
<published>2018-11-03T20:13:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e4028935cca3f9ef9b6a90df9da6f1f94853536'/>
<id>urn:sha1:9e4028935cca3f9ef9b6a90df9da6f1f94853536</id>
<content type='text'>
Currently bh is set to NULL only during first iteration of for cycle,
then this pointer is not cleared after end of using.
Therefore rollback after errors can lead to extra brelse(bh) call,
decrements bh counter and later trigger an unexpected warning in __brelse()

Patch moves brelse() calls in body of cycle to exclude requirement of
brelse() call in rollback.

Fixes: 33afdcc5402d ("ext4: add a function which sets up group blocks ...")
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 # 3.3+
</content>
</entry>
</feed>
