On 06/12/2015 10:56 AM, Douglas Fuller wrote:
> static int ceph_oloc_decode(void **p, void *end,
> struct ceph_object_locator *oloc)
> {
> @@ -2795,6 +2889,7 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct
> ceph_client *client)
> osdc->num_requests = 0;
> INIT_DELAYED_WORK(&osdc->timeout_work, handle_timeout);
> INIT_DELAYED_WORK(&osdc->osds_timeout_work, handle_osds_timeout);
> + INIT_DELAYED_WORK(&osdc->linger_ping_work, handle_linger_ping);
> spin_lock_init(&osdc->event_lock);
> osdc->event_tree = RB_ROOT;
> osdc->event_count = 0;
> @@ -3079,12 +3174,15 @@ static struct ceph_msg *alloc_msg(struct
> ceph_connection *con,
> case CEPH_MSG_OSD_MAP:
> case CEPH_MSG_WATCH_NOTIFY:
> {
> - struct ceph_msg *m = ceph_msg_new(type, front,
> GFP_NOFS, false);
> + struct ceph_msg *m = ceph_msg_new(type, front,
> + GFP_NOFS, false);
> size_t len = con->in_hdr.data_len;
> if (len > 0) {
> struct page **pages;
> struct ceph_osd_data osd_data;
> - pages =
> ceph_alloc_page_vector(calc_pages_for(0, len), GFP_KERNEL);
> + pages = ceph_alloc_page_vector(
> + calc_pages_for(0, len), GFP_NOFS);
> + WARN_ON(!pages);
Are you wanting this warn to get more info in case someone sends us a
really large buffer?
Handle the null pointer here like is done elsewhere. If you don't you
will get NULL pointer ooppses or other crashes due to there being a non
zero len but null pages pointer.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html