From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:58947 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754020AbcCAVm6 (ORCPT ); Tue, 1 Mar 2016 16:42:58 -0500 Received: from pmta03.dal05.mailchimp.com (127.0.0.1) by mail333.us4.mandrillapp.com id hqo6e4174noi for ; Tue, 1 Mar 2016 21:42:45 +0000 (envelope-from ) From: Subject: Patch "libceph: use the right footer size when skipping a message" has been added to the 4.4-stable tree To: , , Cc: , Message-Id: <1456868563175182@kroah.com> Date: Tue, 01 Mar 2016 21:42:45 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled libceph: use the right footer size when skipping a message to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: libceph-use-the-right-footer-size-when-skipping-a-message.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From dbc0d3caff5b7591e0cf8e34ca686ca6f4479ee1 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Fri, 19 Feb 2016 11:38:57 +0100 Subject: libceph: use the right footer size when skipping a message From: Ilya Dryomov commit dbc0d3caff5b7591e0cf8e34ca686ca6f4479ee1 upstream. ceph_msg_footer is 21 bytes long, while ceph_msg_footer_old is only 13. Don't skip too much when CEPH_FEATURE_MSG_AUTH isn't negotiated. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- net/ceph/messenger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -1200,6 +1200,13 @@ static bool ceph_msg_data_advance(struct return new_piece; } +static size_t sizeof_footer(struct ceph_connection *con) +{ + return (con->peer_features & CEPH_FEATURE_MSG_AUTH) ? + sizeof(struct ceph_msg_footer) : + sizeof(struct ceph_msg_footer_old); +} + static void prepare_message_data(struct ceph_msg *msg, u32 data_len) { BUG_ON(!msg); @@ -2338,7 +2345,7 @@ static int read_partial_message(struct c ceph_pr_addr(&con->peer_addr.in_addr), seq, con->in_seq + 1); con->in_base_pos = -front_len - middle_len - data_len - - sizeof(m->footer); + sizeof_footer(con); con->in_tag = CEPH_MSGR_TAG_READY; return 1; } else if ((s64)seq - (s64)con->in_seq > 1) { @@ -2363,7 +2370,7 @@ static int read_partial_message(struct c /* skip this message */ dout("alloc_msg said skip message\n"); con->in_base_pos = -front_len - middle_len - data_len - - sizeof(m->footer); + sizeof_footer(con); con->in_tag = CEPH_MSGR_TAG_READY; con->in_seq++; return 1; Patches currently in stable-queue which might be from idryomov@gmail.com are queue-4.4/libceph-fix-ceph_msg_revoke.patch queue-4.4/tcp-dccp-fix-another-race-at-listener-dismantle.patch queue-4.4/libceph-don-t-spam-dmesg-with-stray-reply-warnings.patch queue-4.4/libceph-don-t-bail-early-from-try_read-when-skipping-a-message.patch queue-4.4/libceph-use-the-right-footer-size-when-skipping-a-message.patch