<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.4.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.4.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.4.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-06-09T15:36:19Z</updated>
<entry>
<title>ext4: don't set i_flags in EXT4_IOC_SETFLAGS</title>
<updated>2012-06-09T15:36:19Z</updated>
<author>
<name>Tao Ma</name>
<email>boyu.mt@taobao.com</email>
</author>
<published>2012-06-07T23:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6ab997e0b5440eee1bc76bb9d83aa86e3966adb2'/>
<id>urn:sha1:6ab997e0b5440eee1bc76bb9d83aa86e3966adb2</id>
<content type='text'>
commit b22b1f178f6799278d3178d894f37facb2085765 upstream.

Commit 7990696 uses the ext4_{set,clear}_inode_flags() functions to
change the i_flags automatically but fails to remove the error setting
of i_flags.  So we still have the problem of trashing state flags.
Fix this by removing the assignment.

Signed-off-by: Tao Ma &lt;boyu.mt@taobao.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>vfs: Fix /proc/&lt;tid&gt;/fdinfo/&lt;fd&gt; file handling</title>
<updated>2012-06-09T15:36:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-06-04T18:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf9ab4c62be7837c2f007cd51ab3604ca0620070'/>
<id>urn:sha1:cf9ab4c62be7837c2f007cd51ab3604ca0620070</id>
<content type='text'>
commit 0640113be25d283e0ff77a9f041e1242182387f0 upstream.

Cyrill Gorcunov reports that I broke the fdinfo files with commit
30a08bf2d31d ("proc: move fd symlink i_mode calculations into
tid_fd_revalidate()"), and he's quite right.

The tid_fd_revalidate() function is not just used for the &lt;tid&gt;/fd
symlinks, it's also used for the &lt;tid&gt;/fdinfo/&lt;fd&gt; files, and the
permission model for those are different.

So do the dynamic symlink permission handling just for symlinks, making
the fdinfo files once more appear as the proper regular files they are.

Of course, Al Viro argued (probably correctly) that we shouldn't do the
symlink permission games at all, and make the symlinks always just be
the normal 'lrwxrwxrwx'.  That would have avoided this issue too, but
since somebody noticed that the permissions had changed (which was the
reason for that original commit 30a08bf2d31d in the first place), people
do apparently use this feature.

[ Basically, you can use the symlink permission data as a cheap "fdinfo"
  replacement, since you see whether the file is open for reading and/or
  writing by just looking at st_mode of the symlink.  So the feature
  does make sense, even if the pain it has caused means we probably
  shouldn't have done it to begin with. ]

Reported-and-tested-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: remove mb_groups before tearing down the buddy_cache</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Salman Qazi</name>
<email>sqazi@google.com</email>
</author>
<published>2012-06-01T03:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f940c5366eaaea9630ba643a036c2df321f66db3'/>
<id>urn:sha1:f940c5366eaaea9630ba643a036c2df321f66db3</id>
<content type='text'>
commit 95599968d19db175829fb580baa6b68939b320fb upstream.

We can't have references held on pages in the s_buddy_cache while we are
trying to truncate its pages and put the inode.  All the pages must be
gone before we reach clear_inode.  This can only be gauranteed if we
can prevent new users from grabbing references to s_buddy_cache's pages.

The original bug can be reproduced and the bug fix can be verified by:

while true; do mount -t ext4 /dev/ram0 /export/hda3/ram0; \
	umount /export/hda3/ram0; done &amp;

while true; do cat /proc/fs/ext4/ram0/mb_groups; done

Signed-off-by: Salman Qazi &lt;sqazi@google.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_mb_unload_buddy in the error path</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Salman Qazi</name>
<email>sqazi@google.com</email>
</author>
<published>2012-06-01T03:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2e926777a97fc29ebfa409584ed4e790f2e68bf'/>
<id>urn:sha1:d2e926777a97fc29ebfa409584ed4e790f2e68bf</id>
<content type='text'>
commit 02b7831019ea4e7994968c84b5826fa8b248ffc8 upstream.

ext4_free_blocks fails to pair an ext4_mb_load_buddy with a matching
ext4_mb_unload_buddy when it fails a memory allocation.

Signed-off-by: Salman Qazi &lt;sqazi@google.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: don't trash state flags in EXT4_IOC_SETFLAGS</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-06-01T03:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5720f8de251bbf23fc9f4191d6ed5734110b7d67'/>
<id>urn:sha1:5720f8de251bbf23fc9f4191d6ed5734110b7d67</id>
<content type='text'>
commit 79906964a187c405db72a3abc60eb9b50d804fbc upstream.

In commit 353eb83c we removed i_state_flags with 64-bit longs, But
when handling the EXT4_IOC_SETFLAGS ioctl, we replace i_flags
directly, which trashes the state flags which are stored in the high
32-bits of i_flags on 64-bit platforms.  So use the the
ext4_{set,clear}_inode_flags() functions which use atomic bit
manipulation functions instead.

Reported-by: Tao Ma &lt;boyu.mt@taobao.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 missing save_error_info() to ext4_error()</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-05-31T03:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7286a55eb1088df8f8d8c1bde34e0342c63804c'/>
<id>urn:sha1:d7286a55eb1088df8f8d8c1bde34e0342c63804c</id>
<content type='text'>
commit f3fc0210c0fc91900766c995f089c39170e68305 upstream.

The ext4_error() function is missing a call to save_error_info().
Since this is the function which marks the file system as containing
an error, this oversight (which was introduced in 2.6.36) is quite
significant, and should be backported to older stable kernels with
high urgency.

Reported-by: Ken Sumrall &lt;ksumrall@google.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: ksumrall@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: disallow hard-linked directory in ext4_lookup</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Andreas Dilger</name>
<email>adilger@dilger.ca</email>
</author>
<published>2012-05-28T21:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c40a4bd1e80db2b3af7b064b6eece0e689be60a9'/>
<id>urn:sha1:c40a4bd1e80db2b3af7b064b6eece0e689be60a9</id>
<content type='text'>
commit 7e936b737211e6b54e34b71a827e56b872e958d8 upstream.

A hard-linked directory to its parent can cause the VFS to deadlock,
and is a sign of a corrupted file system.  So detect this case in
ext4_lookup(), before the rmdir() lockup scenario can take place.

Signed-off-by: Andreas Dilger &lt;adilger@dilger.ca&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 potential integer overflow in alloc_flex_gd()</title>
<updated>2012-06-09T15:36:16Z</updated>
<author>
<name>Haogang Chen</name>
<email>haogangchen@gmail.com</email>
</author>
<published>2012-05-28T18:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a9ea4481033197d29c606a935b24336a96cb3082'/>
<id>urn:sha1:a9ea4481033197d29c606a935b24336a96cb3082</id>
<content type='text'>
commit 967ac8af4475ce45474800709b12137aa7634c77 upstream.

In alloc_flex_gd(), when flexbg_size is large, kmalloc size would
overflow and flex_gd-&gt;groups would point to a buffer smaller than
expected, causing OOB accesses when it is used.

Note that in ext4_resize_fs(), flexbg_size is calculated using
sbi-&gt;s_log_groups_per_flex, which is read from the disk and only bounded
to [1, 31]. The patch returns NULL for too large flexbg_size.

Reviewed-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Signed-off-by: Haogang Chen &lt;haogangchen@gmail.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: force ro mount if ext4_setup_super() fails</title>
<updated>2012-06-09T15:36:15Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2012-05-28T18:17:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3c7f096206323ae4c9ad3db62fece0b19df21532'/>
<id>urn:sha1:3c7f096206323ae4c9ad3db62fece0b19df21532</id>
<content type='text'>
commit 7e84b6216467b84cd332c8e567bf5aa113fd2f38 upstream.

If ext4_setup_super() fails i.e. due to a too-high revision,
the error is logged in dmesg but the fs is not mounted RO as
indicated.

Tested by:

# mkfs.ext4 -r 4 /dev/sdb6
# mount /dev/sdb6 /mnt/test
# dmesg | grep "too high"
[164919.759248] EXT4-fs (sdb6): revision level too high, forcing read-only mode
# grep sdb6 /proc/mounts
/dev/sdb6 /mnt/test2 ext4 rw,seclabel,relatime,data=ordered 0 0

Reviewed-by: Andreas Dilger &lt;adilger@whamcloud.com&gt;
Signed-off-by: Eric Sandeen &lt;sandeen@redhat.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 potential NULL dereference in ext4_free_inodes_counts()</title>
<updated>2012-06-09T15:36:15Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-05-28T18:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c693b1d2fd1789a8b52f3644d41547b1ba9a26e'/>
<id>urn:sha1:2c693b1d2fd1789a8b52f3644d41547b1ba9a26e</id>
<content type='text'>
commit bb3d132a24cd8bf5e7773b2d9f9baa58b07a7dae upstream.

The ext4_get_group_desc() function returns NULL on error, and
ext4_free_inodes_count() function dereferences it without checking.
There is a check on the next line, but it's too late.

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@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>
</feed>
