All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
To: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
Cc: Andrea Righi
	<righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Robert LeBlanc <robert-4JaGZRWAfWbajFs6igw21g@public.gmane.org>,
	Sean Jenkins
	<sean-v0B6Y9onFlloq1w47eu9iAC/G2K4zDHf@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	target-devel
	<target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
Subject: Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done()
Date: Thu, 29 Jun 2017 22:53:05 -0700	[thread overview]
Message-ID: <1498801985.24896.4.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <7f1b1f07-0670-10ee-620d-0ab3b1a6c2bf-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>

On Thu, 2017-06-29 at 11:28 +0300, Sagi Grimberg wrote:
> >> Can you test just the one liner fix below?
> >>
> >>>> @@ -1452,7 +1452,7 @@
> >>>>   isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
> >>>>   {
> >>>>   	struct isert_conn *isert_conn = wc->qp->qp_context;
> >>>> -	struct ib_device *ib_dev = isert_conn->cm_id->device;
> >>>> +	struct ib_device *ib_dev = isert_conn->device->ib_device;
> >>>>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> >>>>   		isert_print_wc(wc, "login recv");
> > 
> > I'll test also this one-liner fix as soon as I can.
> > 
> > But I can say that I'm pretty sure it will work as well, because all the
> > previous NULL pointer dereferences that we've got in the past happened
> > all 100% in isert_login_recv_done(). The other cases are probably a safe
> > precaution, but they can't really happen.
> 
> Agree, I'd prefer to start with a surgical fix before moving forward.

Sounds fine.  The single line fix above in isert_login_recv_done() has
been queued up in target-pending/for-next with Andrea's Tested-by and
your Reviewed-by:

https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git/commit/?h=for-next&id=702c0f17403765cc5aa1c18f6ea6eb549c1bac9b

Please let me know if there are any other issues wrt the surgical fix.

--
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

WARNING: multiple messages have this Message-ID (diff)
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Andrea Righi <righi.andrea@gmail.com>,
	Robert LeBlanc <robert@leblancnet.us>,
	Sean Jenkins <sean@betterservers.com>,
	Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma <linux-rdma@vger.kernel.org>,
	target-devel <target-devel@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done()
Date: Thu, 29 Jun 2017 22:53:05 -0700	[thread overview]
Message-ID: <1498801985.24896.4.camel@haakon3.risingtidesystems.com> (raw)
In-Reply-To: <7f1b1f07-0670-10ee-620d-0ab3b1a6c2bf@grimberg.me>

On Thu, 2017-06-29 at 11:28 +0300, Sagi Grimberg wrote:
> >> Can you test just the one liner fix below?
> >>
> >>>> @@ -1452,7 +1452,7 @@
> >>>>   isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
> >>>>   {
> >>>>   	struct isert_conn *isert_conn = wc->qp->qp_context;
> >>>> -	struct ib_device *ib_dev = isert_conn->cm_id->device;
> >>>> +	struct ib_device *ib_dev = isert_conn->device->ib_device;
> >>>>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> >>>>   		isert_print_wc(wc, "login recv");
> > 
> > I'll test also this one-liner fix as soon as I can.
> > 
> > But I can say that I'm pretty sure it will work as well, because all the
> > previous NULL pointer dereferences that we've got in the past happened
> > all 100% in isert_login_recv_done(). The other cases are probably a safe
> > precaution, but they can't really happen.
> 
> Agree, I'd prefer to start with a surgical fix before moving forward.

Sounds fine.  The single line fix above in isert_login_recv_done() has
been queued up in target-pending/for-next with Andrea's Tested-by and
your Reviewed-by:

https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git/commit/?h=for-next&id=702c0f17403765cc5aa1c18f6ea6eb549c1bac9b

Please let me know if there are any other issues wrt the surgical fix.

  parent reply	other threads:[~2017-06-30  5:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 18:54 NULL pointer dereference in isert_login_recv_done in 4.9.32 Robert LeBlanc
2017-06-21 15:17 ` Robert LeBlanc
     [not found]   ` <CAANLjFp6Y8wvLvmWrk1ECjm-OoyEppxD1svNYKpg+HDEZevJig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-21 16:33     ` Robert LeBlanc
     [not found]       ` <CAANLjFoQcmfkjq9N1fehTC9Zi6aOC7ArOEPXz-he3EnOvWeEDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-21 22:48         ` Robert LeBlanc
2017-06-22 22:37       ` [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() (was: Re: NULL pointer dereference in isert_login_recv_done in 4.9.32) Andrea Righi
2017-06-25 23:58         ` Nicholas A. Bellinger
2017-06-27  7:03           ` [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Sagi Grimberg
2017-06-28 17:53           ` [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() (was: Re: NULL pointer dereference in isert_login_recv_done in 4.9.32) Andrea Righi
2017-06-29  5:36             ` [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Sagi Grimberg
2017-06-29  5:36               ` Sagi Grimberg
2017-06-29  8:20               ` Andrea Righi
2017-06-29  8:28                 ` Sagi Grimberg
2017-06-29  8:28                   ` Sagi Grimberg
     [not found]                   ` <7f1b1f07-0670-10ee-620d-0ab3b1a6c2bf-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-06-30  5:53                     ` Nicholas A. Bellinger [this message]
2017-06-30  5:53                       ` Nicholas A. Bellinger
2017-06-26  8:53         ` [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() (was: Re: NULL pointer dereference in isert_login_recv_done in 4.9.32) Leon Romanovsky
2017-06-26  8:53           ` Leon Romanovsky

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=1498801985.24896.4.camel@haakon3.risingtidesystems.com \
    --to=nab-izhhd5pylfbp7fqvkimdcq@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=righi.andrea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robert-4JaGZRWAfWbajFs6igw21g@public.gmane.org \
    --cc=sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org \
    --cc=sean-v0B6Y9onFlloq1w47eu9iAC/G2K4zDHf@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=target-devel-u79uwXL29TY76Z2rM5mHXA@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.