From: Potnuri Bharat Teja <bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
To: "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
SWise OGC
<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Subject: Re: [PATCH v2 1/1] RDMA/uverbs: Intialize cq_context properly
Date: Sat, 12 Aug 2017 18:18:11 +0530 [thread overview]
Message-ID: <20170812124810.GA21000@chelsio.com> (raw)
In-Reply-To: <1502132526-18355-1-git-send-email-bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Hi Doug,
Please pull this change for next rc if you feel the change appropriate.
Thanks,
Bharat.
On Tuesday, August 08/08/17, 2017 at 00:32:06 +0530, Potnuri Bharat Teja wrote:
> Initializing cq_context with ev_queue in create_cq(), leads to NULL pointer
> dereference in ib_uverbs_comp_handler(), if application doesnot use completion
> channel. This patch fixes the cq_context initialization.
>
> Fixes: 1e7710f3f65 ("IB/core: Change completion channel to use the reworked")
> Signed-off-by: Potnuri Bharat Teja <bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> Tested-by: Logan Gunthorpe <logang-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/core/uverbs_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
> index 2c98533a0203..50a6c64f0388 100644
> --- a/drivers/infiniband/core/uverbs_cmd.c
> +++ b/drivers/infiniband/core/uverbs_cmd.c
> @@ -1015,7 +1015,7 @@ static struct ib_ucq_object *create_cq(struct ib_uverbs_file *file,
> cq->uobject = &obj->uobject;
> cq->comp_handler = ib_uverbs_comp_handler;
> cq->event_handler = ib_uverbs_cq_event_handler;
> - cq->cq_context = &ev_file->ev_queue;
> + cq->cq_context = ev_file ? &ev_file->ev_queue : NULL;
> atomic_set(&cq->usecnt, 0);
>
> obj->uobject.object = cq;
> --
> 2.5.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-08-12 12:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 19:02 [PATCH v2 1/1] RDMA/uverbs: Intialize cq_context properly Potnuri Bharat Teja
[not found] ` <1502132526-18355-1-git-send-email-bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2017-08-12 12:48 ` Potnuri Bharat Teja [this message]
[not found] ` <20170812124810.GA21000-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2017-08-16 15:02 ` Steve Wise
2017-08-17 22:12 ` Steve Wise
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=20170812124810.GA21000@chelsio.com \
--to=bharat-ut6up61k2wzbdgjk7y7tuq@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.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.