<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/ceph, branch v3.11.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/ceph?h=v3.11.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/ceph?h=v3.11.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-27T00:21:58Z</updated>
<entry>
<title>libceph: use pg_num_mask instead of pgp_num_mask for pg.seed calc</title>
<updated>2013-09-27T00:21:58Z</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2013-08-29T00:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc2a02319530276f4c26b7c219111aae37b8dc1b'/>
<id>urn:sha1:bc2a02319530276f4c26b7c219111aae37b8dc1b</id>
<content type='text'>
commit 9542cf0bf9b1a3adcc2ef271edbcbdba03abf345 upstream.

Fix a typo that used the wrong bitmask for the pg.seed calculation.  This
is normally unnoticed because in most cases pg_num == pgp_num.  It is, however,
a bug that is easily corrected.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Alex Elder &lt;alex.elder@linary.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libceph: unregister request in __map_request failed and nofail == false</title>
<updated>2013-09-27T00:21:58Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-07-16T07:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0bafacccd5ca14013c4935e8d44dc3c0d3672f7'/>
<id>urn:sha1:d0bafacccd5ca14013c4935e8d44dc3c0d3672f7</id>
<content type='text'>
commit 73d9f7eef3d98c3920e144797cc1894c6b005a1e upstream.

For nofail == false request, if __map_request failed, the caller does
cleanup work, like releasing the relative pages.  It doesn't make any sense
to retry this request.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.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: call r_unsafe_callback when unsafe reply is received</title>
<updated>2013-07-03T22:32:58Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-06-24T06:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=61c5d6bf7074ee32d014dcdf7698dc8c59eb712d'/>
<id>urn:sha1:61c5d6bf7074ee32d014dcdf7698dc8c59eb712d</id>
<content type='text'>
We can't use !req-&gt;r_sent to check if OSD request is sent for the
first time, this is because __cancel_request() zeros req-&gt;r_sent
when OSD map changes. Rather than adding a new variable to struct
ceph_osd_request to indicate if it's sent for the first time, We
can call the unsafe callback only when unsafe OSD reply is received.
If OSD's first reply is safe, just skip calling the unsafe callback.

The purpose of unsafe callback is adding unsafe request to a list,
so that fsync(2) can wait for the safe reply. fsync(2) doesn't need
to wait for a write(2) that hasn't returned yet. So it's OK to add
request to the unsafe list when the first OSD reply is received.
(ceph_sync_write() returns after receiving the first OSD reply)

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: Fix NULL pointer dereference in auth client code</title>
<updated>2013-07-03T22:32:55Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@canonical.com</email>
</author>
<published>2013-06-20T20:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2cb33cac622afde897aa02d3dcd9fbba8bae839e'/>
<id>urn:sha1:2cb33cac622afde897aa02d3dcd9fbba8bae839e</id>
<content type='text'>
A malicious monitor can craft an auth reply message that could cause a
NULL function pointer dereference in the client's kernel.

To prevent this, the auth_none protocol handler needs an empty
ceph_auth_client_ops-&gt;build_request() function.

CVE-2013-1059

Signed-off-by: Tyler Hicks &lt;tyhicks@canonical.com&gt;
Reported-by: Chanam Park &lt;chanam.park@hkpco.kr&gt;
Reviewed-by: Seth Arnold &lt;seth.arnold@canonical.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>libceph: fix truncate size calculation</title>
<updated>2013-07-03T22:32:45Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-06-02T10:40:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ccca4e37b1a912da3db68aee826557ea66145273'/>
<id>urn:sha1:ccca4e37b1a912da3db68aee826557ea66145273</id>
<content type='text'>
check the "not truncated yet" case

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: fix safe completion</title>
<updated>2013-07-03T22:32:44Z</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-05-31T07:54:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb845ff13a44477f8a411baedbf11d678b9daf0a'/>
<id>urn:sha1:eb845ff13a44477f8a411baedbf11d678b9daf0a</id>
<content type='text'>
handle_reply() calls complete_request() only if the first OSD reply
has ONDISK flag.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: print more info for short message header</title>
<updated>2013-07-03T22:32:40Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2013-05-29T16:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4974341eb99861720d54db9337bf1fe78eb8b9d0'/>
<id>urn:sha1:4974341eb99861720d54db9337bf1fe78eb8b9d0</id>
<content type='text'>
If an osd client response message arrives that has a front section
that's too big for the buffer set aside to receive it, a warning
gets reported and a new buffer is allocated.

The warning says nothing about which connection had the problem.
Add the peer type and number to what gets reported, to be a bit more
informative.

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: add lingering request reference when registered</title>
<updated>2013-07-03T22:32:37Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2013-05-23T01:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=96e4dac66f69d28af2b736e723364efbbdf9fdee'/>
<id>urn:sha1:96e4dac66f69d28af2b736e723364efbbdf9fdee</id>
<content type='text'>
When an osd request is set to linger, the osd client holds onto the
request so it can be re-submitted following certain osd map changes.
The osd client holds a reference to the request until it is
unregistered.  This is used by rbd for watch requests.

Currently, the reference is taken when the request is marked with
the linger flag.  This means that if an error occurs after that
time but before the the request completes successfully, that
reference is leaked.

There's really no reason to take the reference until the request is
registered in the the osd client's list of lingering requests, and
that only happens when the lingering (watch) request completes
successfully.

So take that reference only when it gets registered following
succesful completion, and drop it (as before) when the request
gets unregistered.  This avoids the reference problem on error
in rbd.

Rearrange ceph_osdc_unregister_linger_request() to avoid using
the request pointer after it may have been freed.

And hold an extra reference in kick_requests() while handling
a linger request that has not yet been registered, to ensure
it doesn't go away.

This resolves:
    http://tracker.ceph.com/issues/3859

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: must hold mutex for reset_changed_osds()</title>
<updated>2013-05-17T17:45:40Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2013-05-15T21:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=14d2f38df67fadee34625fcbd282ee22514c4846'/>
<id>urn:sha1:14d2f38df67fadee34625fcbd282ee22514c4846</id>
<content type='text'>
An osd client has a red-black tree describing its osds, and
occasionally we would get crashes due to one of these trees tree
becoming corrupt somehow.

The problem turned out to be that reset_changed_osds() was being
called without protection of the osd client request mutex.  That
function would call __reset_osd() for any osd that had changed, and
__reset_osd() would call __remove_osd() for any osd with no
outstanding requests, and finally __remove_osd() would remove the
corresponding entry from the red-black tree.  Thus, the tree was
getting modified without having any lock protection, and was
vulnerable to problems due to concurrent updates.

This appears to be the only osd tree updating path that has this
problem.  It can be fairly easily fixed by moving the call up
a few lines, to just before the request mutex gets dropped
in kick_requests().

This resolves:
    http://tracker.ceph.com/issues/5043

Cc: stable@vger.kernel.org # 3.4+
Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>libceph: init sent and completed when starting</title>
<updated>2013-05-13T17:52:23Z</updated>
<author>
<name>Alex Elder</name>
<email>elder@inktank.com</email>
</author>
<published>2013-05-09T19:56:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c10ebbf55b40503a46fb8b29824c9ca1ca089826'/>
<id>urn:sha1:c10ebbf55b40503a46fb8b29824c9ca1ca089826</id>
<content type='text'>
The rbd code has a need to be able to restart an osd request that
has already been started and completed once before.  This currently
wouldn't work right because the osd client code assumes an osd
request will be started exactly once  Certain fields in a request
are never cleared and this leads to trouble if you try to reuse it.

Specifically, the r_sent, r_got_reply, and r_completed fields are
never cleared.  The r_sent field records the osd incarnation at the
time the request was sent to that osd.  If that's non-zero, the
message won't get re-mapped to a target osd properly, and won't be
put on the unsafe requests list the first time it's sent as it
should.  The r_got_reply field is used in handle_reply() to ensure
the reply to a request is processed only once.  And the r_completed
field is used for lingering requests to avoid calling the callback
function every time the osd client re-sends the request on behalf of
its initiator.

Each osd request passes through ceph_osdc_start_request() when
responsibility for the request is handed over to the osd client for
completion.  We can safely zero these three fields there each time a
request gets started.

One last related change--clear the r_linger flag when a request
is no longer registered as a linger request.

This resolves:
    http://tracker.ceph.com/issues/5026

Signed-off-by: Alex Elder &lt;elder@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</content>
</entry>
</feed>
