From: Bart Van Assche <bart.vanassche@sandisk.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
Sagi Grimberg <sagi@grimberg.me>,
Doug Ledford <dledford@redhat.com>
Subject: Re: [PATCH] ib_srpt: Add missing ioctx->buf + ->dma alloc_session_cb init
Date: Thu, 7 Apr 2016 15:48:27 -0700 [thread overview]
Message-ID: <5706E3BB.70302@sandisk.com> (raw)
In-Reply-To: <1460068300.18732.25.camel@haakon3.risingtidesystems.com>
On 04/07/2016 03:31 PM, Nicholas A. Bellinger wrote:
>> I will have a look myself into the percpu_ida conversion.
>
> I found a pair of old ConnectX2 in IB mode and I'll be fixing this up
> for v4.6-rc, so don't even bother.
Please make sure that you understand the ib_srpt driver before you try
to make further modifications to that driver. The patch for percpu_ida
allocation that is already in v4.6-rc1 introduces namely a severe race
condition next to the bugs that I had already explained. The proper
order for session setup is to allocate the send ioctx buffers first and
after these buffers have been allocated to transition to RTR. You
changed that order to transition first to RTR and next to allocate the
send ioctx buffers. By making this change you introduced a race window
during which any command that is received by the ib_srpt driver will try
to allocate a send ioctx from a not yet initialized send ioctx ring.
Bart.
next prev parent reply other threads:[~2016-04-07 22:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 18:23 [PATCH] ib_srpt: Add missing ioctx->buf + ->dma alloc_session_cb init Nicholas A. Bellinger
[not found] ` <1459794233-19187-1-git-send-email-nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
2016-04-04 18:40 ` Bart Van Assche
[not found] ` <5702B503.1060006-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-04 22:41 ` Nicholas A. Bellinger
2016-04-04 22:44 ` Bart Van Assche
[not found] ` <5702EE56.10503-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-04 22:58 ` Nicholas A. Bellinger
2016-04-06 15:31 ` Bart Van Assche
[not found] ` <57052BCB.6070405-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-07 22:31 ` Nicholas A. Bellinger
2016-04-07 22:48 ` Bart Van Assche [this message]
[not found] ` <5706E3BB.70302-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-04-07 23:28 ` Nicholas A. Bellinger
2016-04-04 19:11 ` [PATCH] ib_srpt: fix ifnullfree.cocci warnings kbuild test robot
2016-04-04 19:11 ` [PATCH] ib_srpt: Add missing ioctx->buf + ->dma alloc_session_cb init kbuild test robot
[not found] ` <201604050303.V0jVrIjf%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-04-04 22:42 ` Nicholas A. Bellinger
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=5706E3BB.70302@sandisk.com \
--to=bart.vanassche@sandisk.com \
--cc=dledford@redhat.com \
--cc=linux-rdma@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=sagi@grimberg.me \
--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