On 06/17/2015 09:25 AM, Douglas Fuller wrote:
>
> @@ -3055,12 +3151,33 @@ static struct ceph_msg *alloc_msg(struct
> ceph_connection *con,
> struct ceph_osd *osd = con->private;
> int type = le16_to_cpu(hdr->type);
> int front = le32_to_cpu(hdr->front_len);
> + struct ceph_msg *m;
> + size_t len = con->in_hdr.data_len;
>
> *skip = 0;
> switch (type) {
> case CEPH_MSG_OSD_MAP:
> case CEPH_MSG_WATCH_NOTIFY:
> - return ceph_msg_new(type, front, GFP_NOFS, false);
> + m = ceph_msg_new(type, front, GFP_NOFS, false);
> + if (!m)
> + goto out;
> +
> + if (len > 0) {
> + struct page **pages;
> + struct ceph_osd_data osd_data;
> + pages = ceph_alloc_page_vector(
> + calc_pages_for(0, len), GFP_NOFS);
> + if (!pages)
> + goto out2;
> + osd_data.type = CEPH_OSD_DATA_TYPE_PAGES;
Sorry for the late comment. ceph_alloc_page_vector uses ERR_PTR, so the
above check should be
if (IS_ERR(pages))
goto out2;
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in