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.
next prev parent reply other threads:[~2017-06-30 5:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAANLjFoaZ8ueEQet3Yu6LygmxXBbQ0cHUEYsb2xEON0o3N9=+w@mail.gmail.com>
[not found] ` <CAANLjFp6Y8wvLvmWrk1ECjm-OoyEppxD1svNYKpg+HDEZevJig@mail.gmail.com>
[not found] ` <CAANLjFoQcmfkjq9N1fehTC9Zi6aOC7ArOEPXz-he3EnOvWeEDw@mail.gmail.com>
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 8:20 ` Andrea Righi
2017-06-29 8:28 ` Sagi Grimberg
2017-06-30 5:53 ` Nicholas A. Bellinger [this message]
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
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@linux-iscsi.org \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=righi.andrea@gmail.com \
--cc=robert@leblancnet.us \
--cc=sagi@grimberg.me \
--cc=sean.hefty@intel.com \
--cc=sean@betterservers.com \
--cc=target-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®