<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/ceph, branch v3.2.36</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/ceph?h=v3.2.36</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/ceph?h=v3.2.36'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-10-30T23:26:40Z</updated>
<entry>
<title>tmpfs,ceph,gfs2,isofs,reiserfs,xfs: fix fh_len checking</title>
<updated>2012-10-30T23:26:40Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@google.com</email>
</author>
<published>2012-10-08T03:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ba3385bc8c513fd741f09ef75e53e0e6547b079e'/>
<id>urn:sha1:ba3385bc8c513fd741f09ef75e53e0e6547b079e</id>
<content type='text'>
commit 35c2a7f4908d404c9124c2efc6ada4640ca4d5d5 upstream.

Fuzzing with trinity oopsed on the 1st instruction of shmem_fh_to_dentry(),
	u64 inum = fid-&gt;raw[2];
which is unhelpfully reported as at the end of shmem_alloc_inode():

BUG: unable to handle kernel paging request at ffff880061cd3000
IP: [&lt;ffffffff812190d0&gt;] shmem_alloc_inode+0x40/0x40
Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Call Trace:
 [&lt;ffffffff81488649&gt;] ? exportfs_decode_fh+0x79/0x2d0
 [&lt;ffffffff812d77c3&gt;] do_handle_open+0x163/0x2c0
 [&lt;ffffffff812d792c&gt;] sys_open_by_handle_at+0xc/0x10
 [&lt;ffffffff83a5f3f8&gt;] tracesys+0xe1/0xe6

Right, tmpfs is being stupid to access fid-&gt;raw[2] before validating that
fh_len includes it: the buffer kmalloc'ed by do_sys_name_to_handle() may
fall at the end of a page, and the next page not be present.

But some other filesystems (ceph, gfs2, isofs, reiserfs, xfs) are being
careless about fh_len too, in fh_to_dentry() and/or fh_to_parent(), and
could oops in the same way: add the missing fh_len checks to those.

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Sage Weil &lt;sage@inktank.com&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>ceph: disable use of dcache for readdir etc.</title>
<updated>2011-12-29T16:05:14Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-12-29T16:05:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a4d46363ce96c8fd7534c6f79051c78b52464132'/>
<id>urn:sha1:a4d46363ce96c8fd7534c6f79051c78b52464132</id>
<content type='text'>
Ceph attempts to use the dcache to satisfy negative lookups and readdir
when the entire directory contents are in cache.  Disable this behavior
until lingering bugs in this code are shaken out; we'll re-enable these
hooks once things are fully stable.

Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: add missing spin_unlock at ceph_mdsc_build_path()</title>
<updated>2011-12-13T19:59:53Z</updated>
<author>
<name>Yehuda Sadeh</name>
<email>yehuda@hq.newdream.net</email>
</author>
<published>2011-12-13T17:57:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d5a09e659f8414dd3713e2acbfaf8a9e9794aa1'/>
<id>urn:sha1:9d5a09e659f8414dd3713e2acbfaf8a9e9794aa1</id>
<content type='text'>
one of the paths was missing spin_unlock

Signed-off-by: Yehuda Sadeh &lt;yehuda@hq.newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: fix SEEK_CUR, SEEK_SET regression</title>
<updated>2011-12-13T17:19:26Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-12-13T17:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a82c47aa84ab22cb5969a44105cca5358879d21'/>
<id>urn:sha1:6a82c47aa84ab22cb5969a44105cca5358879d21</id>
<content type='text'>
Commit 06222e491e663dac939f04b125c9dc52126a75c4 got the if wrong so that
it always evaluates as true.  This is semantically harmless, but makes
SEEK_CUR and SEEK_SET needlessly query the server.

Rewrite the if to explicitly enumerate the cases we DO need a valid i_size
to make this code less fragile.

Reported-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: use i_ceph_lock instead of i_lock</title>
<updated>2011-12-07T18:46:44Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-11-30T17:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be655596b3de5873f994ddbe205751a5ffb4de39'/>
<id>urn:sha1:be655596b3de5873f994ddbe205751a5ffb4de39</id>
<content type='text'>
We have been using i_lock to protect all kinds of data structures in the
ceph_inode_info struct, including lists of inodes that we need to iterate
over while avoiding races with inode destruction.  That requires grabbing
a reference to the inode with the list lock protected, but igrab() now
takes i_lock to check the inode flags.

Changing the list lock ordering would be a painful process.

However, using a ceph-specific i_ceph_lock in the ceph inode instead of
i_lock is a simple mechanical change and avoids the ordering constraints
imposed by igrab().

Reported-by: Amon Ott &lt;a.ott@m-privacy.de&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: fix rasize reporting by ceph_show_options</title>
<updated>2011-12-02T17:27:54Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-12-01T16:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2151937d7ce491bfbe269a1ae742c6686904474c'/>
<id>urn:sha1:2151937d7ce491bfbe269a1ae742c6686904474c</id>
<content type='text'>
Fix typo.

Reported-by: mowang da &lt;whooya.xxl@gmail.com&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: initialize root dentry</title>
<updated>2011-11-11T17:50:17Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-11-11T17:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=774ac21da76f5c3018428725074e27a3fd40b128'/>
<id>urn:sha1:774ac21da76f5c3018428725074e27a3fd40b128</id>
<content type='text'>
Set up d_fsdata on the root dentry.  This fixes a NULL pointer dereference
in ceph_d_prune on umount.  It also means we can eventually strip out all
of the conditional checks on d_fsdata because it is now set unconditionally
(prior to setting up the d_ops).

Fix the ceph_d_prune debug print while we're here.

Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph: fix iput race when queueing inode work</title>
<updated>2011-11-06T05:06:31Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@newdream.net</email>
</author>
<published>2011-11-06T05:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=15a2015fbc692e1c97d7ce12d96e077f5ae7ea6d'/>
<id>urn:sha1:15a2015fbc692e1c97d7ce12d96e077f5ae7ea6d</id>
<content type='text'>
If we queue a work item that calls iput(), make sure we ihold() before
attempting to queue work. Otherwise our queued work might miraculously run
before we notice the queue_work() succeeded and call ihold(), allowing the
inode to be destroyed.

That is, instead of

	if (queue_work(...))
		ihold();

we need to do

	ihold();
	if (!queue_work(...))
		iput();

Reported-by: Amon Ott &lt;a.ott@m-privacy.de&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph/super.c: quiet sparse noise</title>
<updated>2011-11-06T04:10:12Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2011-09-23T18:53:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0c6d4b4e22a513f8563a2e00c5ab08e9f8796272'/>
<id>urn:sha1:0c6d4b4e22a513f8563a2e00c5ab08e9f8796272</id>
<content type='text'>
Quiet the sparse noise:

warning: symbol 'create_fs_client' was not declared. Should it be static?
warning: symbol 'destroy_fs_client' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Sage Weil &lt;sage@newdream.net&gt;
ceph-devel@vger.kernel.org
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
<entry>
<title>ceph/mds_client.c: quiet sparse noise</title>
<updated>2011-11-06T04:10:11Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2011-09-23T20:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7fd7d101ff50af55d6d69f4705facc00c324024e'/>
<id>urn:sha1:7fd7d101ff50af55d6d69f4705facc00c324024e</id>
<content type='text'>
Quiet the following sparse noise:

warning: symbol 'get_nonsnap_parent' was not declared. Should it be static?
warning: symbol 'done_closing_sessions' was not declared. Should it be static?

Local functions don't need external visability. Make them static.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Sage Weil &lt;sage@newdream.net&gt;
Signed-off-by: Sage Weil &lt;sage@newdream.net&gt;
</content>
</entry>
</feed>
