<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.4.22</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.4.22</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.4.22'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-03T19:47:10Z</updated>
<entry>
<title>jbd: Fix lock ordering bug in journal_unmap_buffer()</title>
<updated>2012-12-03T19:47:10Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-11-23T13:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=acaf0ed4bdd03d31d0df0bf33816bdaceecbe7cc'/>
<id>urn:sha1:acaf0ed4bdd03d31d0df0bf33816bdaceecbe7cc</id>
<content type='text'>
commit 25389bb207987b5774182f763b9fb65ff08761c8 upstream.

Commit 09e05d48 introduced a wait for transaction commit into
journal_unmap_buffer() in the case we are truncating a buffer undergoing commit
in the page stradding i_size on a filesystem with blocksize &lt; pagesize. Sadly
we forgot to drop buffer lock before waiting for transaction commit and thus
deadlock is possible when kjournald wants to lock the buffer.

Fix the problem by dropping the buffer lock before waiting for transaction
commit. Since we are still holding page lock (and that is OK), buffer cannot
disappear under us.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>jffs2: Fix lock acquisition order bug in jffs2_write_begin</title>
<updated>2012-12-03T19:47:06Z</updated>
<author>
<name>Thomas Betker</name>
<email>thomas.betker@freenet.de</email>
</author>
<published>2012-10-17T20:59:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=262a70e8fbf870359ced2059becf116a249bb2d5'/>
<id>urn:sha1:262a70e8fbf870359ced2059becf116a249bb2d5</id>
<content type='text'>
commit 5ffd3412ae5536a4c57469cb8ea31887121dcb2e upstream.

jffs2_write_begin() first acquires the page lock, then f-&gt;sem. This
causes an AB-BA deadlock with jffs2_garbage_collect_live(), which first
acquires f-&gt;sem, then the page lock:

jffs2_garbage_collect_live
    mutex_lock(&amp;f-&gt;sem)                         (A)
    jffs2_garbage_collect_dnode
        jffs2_gc_fetch_page
            read_cache_page_async
                do_read_cache_page
                    lock_page(page)             (B)

jffs2_write_begin
    grab_cache_page_write_begin
        find_lock_page
            lock_page(page)                     (B)
    mutex_lock(&amp;f-&gt;sem)                         (A)

We fix this by restructuring jffs2_write_begin() to take f-&gt;sem before
the page lock. However, we make sure that f-&gt;sem is not held when
calling jffs2_reserve_space(), as this is not permitted by the locking
rules.

The deadlock above was observed multiple times on an SoC with a dual
ARMv7 (Cortex-A9), running the long-term 3.4.11 kernel; it occurred
when using scp to copy files from a host system to the ARM target
system. The fix was heavily tested on the same target system.

Signed-off-by: Thomas Betker &lt;thomas.betker@rohde-schwarz.com&gt;
Acked-by: Joakim Tjernlund &lt;Joakim.Tjernlund@transmode.se&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>UBIFS: fix compilation warning</title>
<updated>2012-12-03T19:46:35Z</updated>
<author>
<name>Alexandre Pereira da Silva</name>
<email>aletes.xgr@gmail.com</email>
</author>
<published>2012-06-25T20:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32e11d55e7997fe45c452b71014ee934054a1245'/>
<id>urn:sha1:32e11d55e7997fe45c452b71014ee934054a1245</id>
<content type='text'>
commit 782759b9f5f5223e0962af60c3457c912fab755f upstream.

Fix the following compilation warning:

fs/ubifs/dir.c: In function 'ubifs_rename':
fs/ubifs/dir.c:972:15: warning: 'saved_nlink' may be used uninitialized
in this function

Use the 'uninitialized_var()' macro to get rid of this false-positive.

Artem: massaged the patch a bit.

Signed-off-by: Alexandre Pereira da Silva &lt;aletes.xgr@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: avoid 32-bit page index overflow</title>
<updated>2012-11-26T19:38:44Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2012-10-02T15:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7d68a7434bbfd57049927ca713d57e44e0eee04'/>
<id>urn:sha1:b7d68a7434bbfd57049927ca713d57e44e0eee04</id>
<content type='text'>
(cherry picked from commit 6285bc231277419255f3498d3eb5ddc9f8e7fe79)

A pgoff_t is defined (by default) to have type (unsigned long).  On
architectures such as i686 that's a 32-bit type.  The ceph address
space code was attempting to produce 64 bit offsets by shifting a
page's index by PAGE_CACHE_SHIFT, but the result was not what was
desired because the shift occurred before the result got promoted
to 64 bits.

Fix this by converting all uses of page-&gt;index used in this way to
use the page_offset() macro, which ensures the 64-bit result has the
intended value.

This fixes http://tracker.newdream.net/issues/3112

Reported-by:  Mohamed Pakkeer &lt;pakkeer.mohideen@realimage.com&gt;
Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: Fix oops when handling mdsmap that decreases max_mds</title>
<updated>2012-11-26T19:38:44Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2012-09-20T09:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=73bba6fc44591587254fec8e867a99b5a2a28ba7'/>
<id>urn:sha1:73bba6fc44591587254fec8e867a99b5a2a28ba7</id>
<content type='text'>
(cherry picked from commit 3e8f43a089f06279c5f76a9ccd42578eebf7bfa5)

When i &gt;= newmap-&gt;m_max_mds, ceph_mdsmap_get_addr(newmap, i) return
NULL. Passing NULL to memcmp() triggers oops.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libceph: delay debugfs initialization until we learn global_id</title>
<updated>2012-11-26T19:38:43Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2012-08-19T19:29:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=523693067608f067bcbe94f23a4feb4dfcfa2db8'/>
<id>urn:sha1:523693067608f067bcbe94f23a4feb4dfcfa2db8</id>
<content type='text'>
(cherry picked from commit d1c338a509cea5378df59629ad47382810c38623)

The debugfs directory includes the cluster fsid and our unique global_id.
We need to delay the initialization of the debug entry until we have
learned both the fsid and our global_id from the monitor or else the
second client can't create its debugfs entry and will fail (and multiple
client instances aren't properly reflected in debugfs).

Reported by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Yehuda Sadeh &lt;yehuda@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libceph: set peer name on con_open, not init</title>
<updated>2012-11-26T19:38:37Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2012-06-27T19:24:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=638ba1765d03bdc3a972bfca69fd0a4a4eda717c'/>
<id>urn:sha1:638ba1765d03bdc3a972bfca69fd0a4a4eda717c</id>
<content type='text'>
(cherry picked from commit b7a9e5dd40f17a48a72f249b8bbc989b63bae5fd)

The peer name may change on each open attempt, even when the connection is
reused.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libceph: fully initialize connection in con_init()</title>
<updated>2012-11-26T19:38:23Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2012-05-27T04:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6880138c03448b3c375a3d7a8ef6acd688e6fb40'/>
<id>urn:sha1:6880138c03448b3c375a3d7a8ef6acd688e6fb40</id>
<content type='text'>
(cherry picked from commit 1bfd89f4e6e1adc6a782d94aa5d4c53be1e404d7)

Move the initialization of a ceph connection's private pointer,
operations vector pointer, and peer name information into
ceph_con_init().  Rearrange the arguments so the connection pointer
is first.  Hide the byte-swapping of the peer entity number inside
ceph_con_init()

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libceph: embed ceph messenger structure in ceph_client</title>
<updated>2012-11-26T19:38:21Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2012-05-27T04:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d910c114b6da5b78c88889eff1b3f9e83c6f81cb'/>
<id>urn:sha1:d910c114b6da5b78c88889eff1b3f9e83c6f81cb</id>
<content type='text'>
(cherry picked from commit 15d9882c336db2db73ccf9871ae2398e452f694c)

A ceph client has a pointer to a ceph messenger structure in it.
There is always exactly one ceph messenger for a ceph client, so
there is no need to allocate it separate from the ceph client
structure.

Switch the ceph_client structure to embed its ceph_messenger
structure.

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Yehuda Sadeh &lt;yehuda@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ceph: check PG_Private flag before accessing page-&gt;private</title>
<updated>2012-11-26T19:38:20Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2012-05-28T06:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e7fda85c9dab7396c5ed7345ab7c6fcdf4ffc366'/>
<id>urn:sha1:e7fda85c9dab7396c5ed7345ab7c6fcdf4ffc366</id>
<content type='text'>
(cherry picked from commit 28c0254ede13ab575d2df5c6585ed3d4817c3e6b)

I got lots of NULL pointer dereference Oops when compiling kernel on ceph.
The bug is because the kernel page migration routine replaces some pages
in the page cache with new pages, these new pages' private can be non-zero.

Signed-off-by: Zheng Yan &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
