Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1677514
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andrea Righi <righi.andrea@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() |
| Date | Thu, 29 Jun 2017 10:30:01 +0200 |
| Message-ID | <tXCZP-5df-5@gated-at.bofh.it> (permalink) |
| References | <tViVA-2hN-19@gated-at.bofh.it> <tViVA-2hN-21@gated-at.bofh.it> <tViVA-2hN-23@gated-at.bofh.it> <tViVA-2hN-17@gated-at.bofh.it> <tWpBE-38C-5@gated-at.bofh.it> <tXpq5-t5-223@gated-at.bofh.it> <tXAlk-3x9-5@gated-at.bofh.it> |
| X-Original-To | Sagi Grimberg <sagi@grimberg.me> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=BzF0g/Moq0mDF0QvbyaeUGWCJByODlrSQRecc/ztwIo=; b=dIDKbNJ5XHvWRw16YHQ5Qxf2GK0jvEGnqH64f2qvfo7wQdCogA7xcy9p0FHhr99a5Q jc8H0QlNkE9A4zjB5rmwW55xTKvCKcUALS0N9KrBsd62/pyn7NHnIIafPhHXbPThW5B2 qIBMQQdXQgkEkGHDEizBYxFl+lQ7nRUTaL5jnsutbPWDIHAmyfnHMwiZ7+fIS/cR0xT3 G3jAMd0LJ1xuHBHEOIjV5ZM6CYZFRwVfWast/5xyD1yjEKK8s7OVMZvZS8LYUORiPHb7 surV3aSz0jTqvB9sg/i+ijF6vTaC6jUN+YnDZRufEND8qPPTV+WTe2VAMlZ6uwd4NueU E2KQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=BzF0g/Moq0mDF0QvbyaeUGWCJByODlrSQRecc/ztwIo=; b=sarjrAUf1WRLPenN2tUSaqgTWqIJzsIGaMwW8Fus9jnEjWkOO40WfraqPk86a9LDtj 2wc85SRTW6wtFm8yCUvELYXNIeZhWwxXMr8db504whdvOqDLhMedM7kwy9dU9nE5oLHk sITiRpQqa4E3aRx7rWg1kRtDh19g8LVoatB6hLCly/jrrvNTd2oCVsq1mnUPzY+gRc/w r7PkMhffjY7rkAwly1f5ROjfjSV92Rf9QBqhebRWf/Y9uCCVhNgeyfCbW1hD/pfyiYwu rU0i6fYK+NzmJjHXj7JgLQRq77XeA8amxCmwxVnKAJUdUv3tJDq2rfVYxBIk6YMq4n6+ k22w== |
| X-Gm-Message-State | AIVw113TQijFTJyYMOmAreyVJD+tTLdeTV9mUbfIJPuiMeH6y8WCZExV /OVWyfys6GNsIQ== |
| X-Received | by 10.28.148.18 with SMTP id w18mr845580wmd.56.1498724460107; Thu, 29 Jun 2017 01:21:00 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 26 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "Nicholas A. Bellinger" <nab@linux-iscsi.org>, 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> |
| X-Original-Date | Thu, 29 Jun 2017 10:20:57 +0200 |
| X-Original-Message-ID | <20170629082057.GA2037@Dell> |
| X-Original-References | <CAANLjFoaZ8ueEQet3Yu6LygmxXBbQ0cHUEYsb2xEON0o3N9=+w@mail.gmail.com> <CAANLjFp6Y8wvLvmWrk1ECjm-OoyEppxD1svNYKpg+HDEZevJig@mail.gmail.com> <CAANLjFoQcmfkjq9N1fehTC9Zi6aOC7ArOEPXz-he3EnOvWeEDw@mail.gmail.com> <20170622223757.GC28955@Dell> <1498435084.26123.66.camel@haakon3.risingtidesystems.com> <20170628175354.GB1769@Dell> <ac404f71-3f34-af4c-b7b2-2b19ae768f47@grimberg.me> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1677514 |
Show key headers only | View raw
On Thu, Jun 29, 2017 at 08:36:51AM +0300, Sagi Grimberg wrote:
>
> >Just tested this patch, I wasn't able to reproduce the NULL pointer
> >dereference or any other bugs, so this fix seems safe enough to me.
> >
> >Tested-by: Andrea Righi <righi.andrea@gmail.com>
>
> 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.
-Andrea
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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 <righi.andrea@gmail.com> - 2017-06-23 00:40 +0200
Re: [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) "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2017-06-26 02:00 +0200
Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Sagi Grimberg <sagi@grimberg.me> - 2017-06-27 09:10 +0200
Re: [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 <righi.andrea@gmail.com> - 2017-06-28 20:00 +0200
Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Sagi Grimberg <sagi@grimberg.me> - 2017-06-29 07:40 +0200
Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Andrea Righi <righi.andrea@gmail.com> - 2017-06-29 10:30 +0200
Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() Sagi Grimberg <sagi@grimberg.me> - 2017-06-29 10:30 +0200
Re: [PATCH] ib_isert: prevent NULL pointer dereference in isert_login_recv_done() "Nicholas A. Bellinger" <nab@linux-iscsi.org> - 2017-06-30 08:00 +0200
Re: [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 <leon@kernel.org> - 2017-06-26 11:00 +0200
csiph-web