<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext4/balloc.c, branch linux-4.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-08-16T07:35:00Z</updated>
<entry>
<title>ext4: validate s_reserved_gdt_blocks on mount</title>
<updated>2016-08-16T07:35:00Z</updated>
<author>
<name>Theodore Ts'o</name>
</author>
<published>2016-07-06T00:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9cfaab733a0143f19de96c97c1876d56800478a4'/>
<id>urn:sha1:9cfaab733a0143f19de96c97c1876d56800478a4</id>
<content type='text'>
commit 5b9554dc5bf008ae7f68a52e3d7e76c0920938a2 upstream.

If s_reserved_gdt_blocks is extremely large, it's possible for
ext4_init_block_bitmap(), which is called when ext4 sets up an
uninitialized block bitmap, to corrupt random kernel memory.  Add the
same checks which e2fsck has --- it must never be larger than
blocksize / sizeof(__u32) --- and then add a backup check in
ext4_init_block_bitmap() in case the superblock gets modified after
the file system is mounted.

Reported-by: Vegard Nossum &lt;vegard.nossum@oracle.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: fix race in transient ENOSPC detection</title>
<updated>2016-05-13T04:42:40Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-05-13T04:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbc427ce4028580f1244b5b57ca1cbea31aad1e7'/>
<id>urn:sha1:dbc427ce4028580f1244b5b57ca1cbea31aad1e7</id>
<content type='text'>
When there are blocks to free in the running transaction, block
allocator can return ENOSPC although the filesystem has some blocks to
free. We use ext4_should_retry_alloc() to force commit of the current
transaction and return whether anything was committed so that it makes
sense to retry the allocation. However the transaction may get committed
after block allocation fails but before we call
ext4_should_retry_alloc(). So ext4_should_retry_alloc() returns false
because there is nothing to commit and we wrongly return ENOSPC.

Fix the race by unconditionally returning 1 from ext4_should_retry_alloc()
when we tried to commit a transaction. This should not add any
unnecessary retries since we had a transaction running a while ago when
trying to allocate blocks and we want to retry the allocation once that
transaction has committed anyway.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: fix scheduling in atomic on group checksum failure</title>
<updated>2016-02-12T04:15:12Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-02-12T04:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05145bd799e498ce4e3b5145894174ee881f02b0'/>
<id>urn:sha1:05145bd799e498ce4e3b5145894174ee881f02b0</id>
<content type='text'>
When block group checksum is wrong, we call ext4_error() while holding
group spinlock from ext4_init_block_bitmap() or
ext4_init_inode_bitmap() which results in scheduling while in atomic.
Fix the issue by calling ext4_error() later after dropping the spinlock.

CC: stable@vger.kernel.org
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>ext4: make the bitmap read routines return real error codes</title>
<updated>2015-10-18T01:33:24Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2015-10-18T01:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9008a58e5dcee014f5de69d154e2620870f9224e'/>
<id>urn:sha1:9008a58e5dcee014f5de69d154e2620870f9224e</id>
<content type='text'>
Make the bitmap reaading routines return real error codes (EIO,
EFSCORRUPTED, EFSBADCRC) which can then be reflected back to
userspace for more precise diagnosis work.

In particular, this means that mballoc no longer claims that we're out
of memory if the block bitmaps become corrupt.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: clean up feature test macros with predicate functions</title>
<updated>2015-10-17T20:18:43Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2015-10-17T20:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e2b911c53584a92266943f3b7f2cdbc19c1a4e80'/>
<id>urn:sha1:e2b911c53584a92266943f3b7f2cdbc19c1a4e80</id>
<content type='text'>
Create separate predicate functions to test/set/clear feature flags,
thereby replacing the wordy old macros.  Furthermore, clean out the
places where we open-coded feature tests.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
</content>
</entry>
<entry>
<title>ext4: call out CRC and corruption errors with specific error codes</title>
<updated>2015-10-17T20:16:04Z</updated>
<author>
<name>Darrick J. Wong</name>
</author>
<published>2015-10-17T20:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a797d2737838906f2ea0a31686e87c3151e21ca'/>
<id>urn:sha1:6a797d2737838906f2ea0a31686e87c3151e21ca</id>
<content type='text'>
Instead of overloading EIO for CRC errors and corrupt structures,
return the same error codes that XFS returns for the same issues.

Signed-off-by: Darrick J. Wong &lt;darrick.wong@oracle.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: verify block bitmap even after fresh initialization</title>
<updated>2015-06-08T15:18:52Z</updated>
<author>
<name>Lukas Czerner</name>
</author>
<published>2015-06-08T15:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41e5b7ed3e9597ccc46b6affc81872e6370936d9'/>
<id>urn:sha1:41e5b7ed3e9597ccc46b6affc81872e6370936d9</id>
<content type='text'>
If we want to rely on the buffer_verified() flag of the block bitmap
buffer, we have to set it consistently. However currently if we're
initializing uninitialized block bitmap in
ext4_read_block_bitmap_nowait() we're not going to set buffer verified
at all.

We can do this by simply setting the flag on the buffer, but I think
it's actually better to run ext4_validate_block_bitmap() to make sure
that what we did in the ext4_init_block_bitmap() is right.

So run ext4_validate_block_bitmap() even after the block bitmap
initialization. Also bail out early from ext4_validate_block_bitmap() if
we see corrupt bitmap, since we already know it's corrupt and we do not
need to verify that.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: remove unnecessary lock/unlock of i_block_reservation_lock</title>
<updated>2015-04-03T04:02:53Z</updated>
<author>
<name>Maurizio Lombardi</name>
</author>
<published>2015-04-03T04:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a4f3145aa685ddc2caf424763d42d3eaaebbc6f'/>
<id>urn:sha1:5a4f3145aa685ddc2caf424763d42d3eaaebbc6f</id>
<content type='text'>
This is a leftover of commit 71d4f7d032149b935a26eb3ff85c6c837f3714e1

Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
</content>
</entry>
<entry>
<title>ext4: remove unused header files</title>
<updated>2015-04-03T03:47:42Z</updated>
<author>
<name>Sheng Yong</name>
</author>
<published>2015-04-03T03:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72b8e0f9fa8aee7e623808af1a5f33b70ebcb2c7'/>
<id>urn:sha1:72b8e0f9fa8aee7e623808af1a5f33b70ebcb2c7</id>
<content type='text'>
Remove unused header files and header files which are included in
ext4.h.

Signed-off-by: Sheng Yong &lt;shengyong1@huawei.com&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>ext4: move error report out of atomic context in ext4_init_block_bitmap()</title>
<updated>2014-10-13T07:42:12Z</updated>
<author>
<name>Dmitry Monakhov</name>
</author>
<published>2014-10-13T07:42:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aef4885ae14f1df75b58395c5314d71f613d26d9'/>
<id>urn:sha1:aef4885ae14f1df75b58395c5314d71f613d26d9</id>
<content type='text'>
Error report likely result in IO so it is bad idea to do it from
atomic context.

This patch should fix following issue:

BUG: sleeping function called from invalid context at include/linux/buffer_head.h:349
in_atomic(): 1, irqs_disabled(): 0, pid: 137, name: kworker/u128:1
5 locks held by kworker/u128:1/137:
 #0:  ("writeback"){......}, at: [&lt;ffffffff81085618&gt;] process_one_work+0x228/0x4d0
 #1:  ((&amp;(&amp;wb-&gt;dwork)-&gt;work)){......}, at: [&lt;ffffffff81085618&gt;] process_one_work+0x228/0x4d0
 #2:  (jbd2_handle){......}, at: [&lt;ffffffff81242622&gt;] start_this_handle+0x712/0x7b0
 #3:  (&amp;ei-&gt;i_data_sem){......}, at: [&lt;ffffffff811fa387&gt;] ext4_map_blocks+0x297/0x430
 #4:  (&amp;(&amp;bgl-&gt;locks[i].lock)-&gt;rlock){......}, at: [&lt;ffffffff811f3180&gt;] ext4_read_block_bitmap_nowait+0x5d0/0x630
CPU: 3 PID: 137 Comm: kworker/u128:1 Not tainted 3.17.0-rc2-00184-g82752e4 #165
Hardware name: Intel Corporation W2600CR/W2600CR, BIOS SE5C600.86B.99.99.x028.061320111235 06/13/2011
Workqueue: writeback bdi_writeback_workfn (flush-1:0)
 0000000000000411 ffff880813777288 ffffffff815c7fdc ffff880813777288
 ffff880813a8bba0 ffff8808137772a8 ffffffff8108fb30 ffff880803e01e38
 ffff880803e01e38 ffff8808137772c8 ffffffff811a8d53 ffff88080ecc6000
Call Trace:
 [&lt;ffffffff815c7fdc&gt;] dump_stack+0x51/0x6d
 [&lt;ffffffff8108fb30&gt;] __might_sleep+0xf0/0x100
 [&lt;ffffffff811a8d53&gt;] __sync_dirty_buffer+0x43/0xe0
 [&lt;ffffffff811a8e03&gt;] sync_dirty_buffer+0x13/0x20
 [&lt;ffffffff8120f581&gt;] ext4_commit_super+0x1d1/0x230
 [&lt;ffffffff8120fa03&gt;] save_error_info+0x23/0x30
 [&lt;ffffffff8120fd06&gt;] __ext4_error+0xb6/0xd0
 [&lt;ffffffff8120f260&gt;] ? ext4_group_desc_csum+0x140/0x190
 [&lt;ffffffff811f2d8c&gt;] ext4_read_block_bitmap_nowait+0x1dc/0x630
 [&lt;ffffffff8122e23a&gt;] ext4_mb_init_cache+0x21a/0x8f0
 [&lt;ffffffff8113ae95&gt;] ? lru_cache_add+0x55/0x60
 [&lt;ffffffff8112e16c&gt;] ? add_to_page_cache_lru+0x6c/0x80
 [&lt;ffffffff8122eaa0&gt;] ext4_mb_init_group+0x190/0x280
 [&lt;ffffffff8122ec51&gt;] ext4_mb_good_group+0xc1/0x190
 [&lt;ffffffff8123309a&gt;] ext4_mb_regular_allocator+0x17a/0x410
 [&lt;ffffffff8122c821&gt;] ? ext4_mb_use_preallocated+0x31/0x380
 [&lt;ffffffff81233535&gt;] ? ext4_mb_new_blocks+0x205/0x8e0
 [&lt;ffffffff8116ed5c&gt;] ? kmem_cache_alloc+0xfc/0x180
 [&lt;ffffffff812335b0&gt;] ext4_mb_new_blocks+0x280/0x8e0
 [&lt;ffffffff8116f2c4&gt;] ? __kmalloc+0x144/0x1c0
 [&lt;ffffffff81221797&gt;] ? ext4_find_extent+0x97/0x320
 [&lt;ffffffff812257f4&gt;] ext4_ext_map_blocks+0xbc4/0x1050
 [&lt;ffffffff811fa387&gt;] ? ext4_map_blocks+0x297/0x430
 [&lt;ffffffff811fa3ab&gt;] ext4_map_blocks+0x2bb/0x430
 [&lt;ffffffff81200e43&gt;] ? ext4_init_io_end+0x23/0x50
 [&lt;ffffffff811feb44&gt;] ext4_writepages+0x564/0xaf0
 [&lt;ffffffff815cde3b&gt;] ? _raw_spin_unlock+0x2b/0x40
 [&lt;ffffffff810ac7bd&gt;] ? lock_release_non_nested+0x2fd/0x3c0
 [&lt;ffffffff811a009e&gt;] ? writeback_sb_inodes+0x10e/0x490
 [&lt;ffffffff811a009e&gt;] ? writeback_sb_inodes+0x10e/0x490
 [&lt;ffffffff811377e3&gt;] do_writepages+0x23/0x40
 [&lt;ffffffff8119c8ce&gt;] __writeback_single_inode+0x9e/0x280
 [&lt;ffffffff811a026b&gt;] writeback_sb_inodes+0x2db/0x490
 [&lt;ffffffff811a0664&gt;] wb_writeback+0x174/0x2d0
 [&lt;ffffffff810ac359&gt;] ? lock_release_holdtime+0x29/0x190
 [&lt;ffffffff811a0863&gt;] wb_do_writeback+0xa3/0x200
 [&lt;ffffffff811a0a40&gt;] bdi_writeback_workfn+0x80/0x230
 [&lt;ffffffff81085618&gt;] ? process_one_work+0x228/0x4d0
 [&lt;ffffffff810856cd&gt;] process_one_work+0x2dd/0x4d0
 [&lt;ffffffff81085618&gt;] ? process_one_work+0x228/0x4d0
 [&lt;ffffffff81085c1d&gt;] worker_thread+0x35d/0x460
 [&lt;ffffffff810858c0&gt;] ? process_one_work+0x4d0/0x4d0
 [&lt;ffffffff810858c0&gt;] ? process_one_work+0x4d0/0x4d0
 [&lt;ffffffff8108a885&gt;] kthread+0xf5/0x100
 [&lt;ffffffff810990e5&gt;] ? local_clock+0x25/0x30
 [&lt;ffffffff8108a790&gt;] ? __init_kthread_worker+0x70/0x70
 [&lt;ffffffff815ce2ac&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff8108a790&gt;] ? __init_kthread_work

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
</feed>
