From: Alex Elder <elder@inktank.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 1/8] libceph: define CEPH_MSG_MAX_MIDDLE_LEN
Date: Sat, 09 Mar 2013 09:13:28 -0600 [thread overview]
Message-ID: <513B5198.7020101@inktank.com> (raw)
In-Reply-To: <513B5116.2020305@inktank.com>
This is probably unnecessary but the code read as if it were wrong
in read_partial_message().
Signed-off-by: Alex Elder <elder@inktank.com>
---
include/linux/ceph/libceph.h | 1 +
net/ceph/messenger.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 29818fc..5493d7b 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -66,6 +66,7 @@ struct ceph_options {
#define CEPH_OSD_IDLE_TTL_DEFAULT 60
#define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024)
+#define CEPH_MSG_MAX_MIDDLE_LEN (16*1024*1024)
#define CEPH_MSG_MAX_DATA_LEN (16*1024*1024)
#define CEPH_AUTH_NAME_DEFAULT "guest"
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index af0c35d..b8d0da5 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1887,7 +1887,7 @@ static int read_partial_message(struct
ceph_connection *con)
if (front_len > CEPH_MSG_MAX_FRONT_LEN)
return -EIO;
middle_len = le32_to_cpu(con->in_hdr.middle_len);
- if (middle_len > CEPH_MSG_MAX_DATA_LEN)
+ if (middle_len > CEPH_MSG_MAX_MIDDLE_LEN)
return -EIO;
data_len = le32_to_cpu(con->in_hdr.data_len);
if (data_len > CEPH_MSG_MAX_DATA_LEN)
--
1.7.9.5
next prev parent reply other threads:[~2013-03-09 15:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-09 15:11 [PATCH 0/8] libceph: miscellaneous cleanups Alex Elder
2013-03-09 15:13 ` Alex Elder [this message]
2013-03-09 15:13 ` [PATCH 2/8] libceph: minor byte order problems in Alex Elder
2013-03-09 15:14 ` [PATCH 3/8] libceph: change type of ceph_tcp_sendpage() "more" Alex Elder
2013-03-09 15:14 ` [PATCH 4/8] libceph: kill args in read_partial_message_bio() Alex Elder
2013-03-09 15:14 ` [PATCH 5/8] libceph: define and use in_msg_pos_next() Alex Elder
2013-03-11 18:57 ` Josh Durgin
2013-03-11 19:16 ` Alex Elder
2013-03-11 19:28 ` Josh Durgin
2013-03-09 15:15 ` [PATCH 6/8] libceph: advance pagelist with list_rotate_left() Alex Elder
2013-03-09 15:15 ` [PATCH 7/8] libceph: simplify new message initialization Alex Elder
2013-03-09 15:15 ` [PATCH 8/8] libceph: record byte count not page count Alex Elder
2013-03-09 15:21 ` [PATCH 0/8] libceph: miscellaneous cleanups Alex Elder
2013-03-11 18:57 ` Josh Durgin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=513B5198.7020101@inktank.com \
--to=elder@inktank.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.