]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libceph: gracefully handle large reply messages from the mon
authorSage Weil <sage@redhat.com>
Mon, 4 Aug 2014 14:01:54 +0000 (07:01 -0700)
committerZefan Li <lizefan@huawei.com>
Mon, 1 Dec 2014 10:02:28 +0000 (18:02 +0800)
commit36d5b7b83ab7931290de2ce533f75c540cb90702
treeeb9961bdee1f8ee80a821aac4730b712f7fefd12
parent386ba13164c2c136c0fbf585aa7b63831c96d7c8
libceph: gracefully handle large reply messages from the mon

commit 73c3d4812b4c755efeca0140f606f83772a39ce4 upstream.

We preallocate a few of the message types we get back from the mon.  If we
get a larger message than we are expecting, fall back to trying to allocate
a new one instead of blindly using the one we have.

Signed-off-by: Sage Weil <sage@redhat.com>
Reviewed-by: Ilya Dryomov <ilya.dryomov@inktank.com>
[lizf: Backported to 3.4: s/front_alloc_len/front_max/g]
Signed-off-by: Zefan Li <lizefan@huawei.com>
net/ceph/mon_client.c