aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlex Elder <[email protected]>2013-03-08 18:51:03 -0600
committerSage Weil <[email protected]>2013-05-01 21:16:29 -0700
commit7b11ba37585595034a91df8869414f732466b800 (patch)
tree7ed58d6ffe58456be69c2c3597426c5c1a5740e0
parentlibceph: clean up skipped message logic (diff)
downloadwireguard-linux-7b11ba37585595034a91df8869414f732466b800.tar.xz
wireguard-linux-7b11ba37585595034a91df8869414f732466b800.zip
libceph: define CEPH_MSG_MAX_MIDDLE_LEN
This is probably unnecessary but the code read as if it were wrong in read_partial_message(). Signed-off-by: Alex Elder <[email protected]> Reviewed-by: Josh Durgin <[email protected]>
-rw-r--r--include/linux/ceph/libceph.h1
-rw-r--r--net/ceph/messenger.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index 29818fc3fa49..5493d7b86423 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 af0c35d40048..b8d0da56d610 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)
OSZAR »